Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(528)

Side by Side Diff: chrome/test/automated_ui_tests/automated_ui_test_test.cc

Issue 140032: Disable some flaky UI tests in windows Debug. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/tab_restore_uitest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/app/chrome_dll_resource.h" 5 #include "chrome/app/chrome_dll_resource.h"
6 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" 6 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h"
7 #include "chrome/test/automation/browser_proxy.h" 7 #include "chrome/test/automation/browser_proxy.h"
8 #include "chrome/test/automation/tab_proxy.h" 8 #include "chrome/test/automation/tab_proxy.h"
9 #include "chrome/test/ui/ui_test.h" 9 #include "chrome/test/ui/ui_test.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 #include "net/base/net_util.h" 11 #include "net/base/net_util.h"
12 12
13 #if defined(OS_MACOSX) 13 #if defined(OS_MACOSX)
14 // The window pops up, but doesn't close. 14 // The window pops up, but doesn't close.
15 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow 15 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow
16 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \ 16 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \
17 DISABLED_OpenCloseBrowserWindowWithAccelerator 17 DISABLED_OpenCloseBrowserWindowWithAccelerator
18 #else 18 #else
19 // http://code.google.com/p/chromium/issues/detail?id=14731 19 // http://code.google.com/p/chromium/issues/detail?id=14731
20 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow 20 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow
21 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \ 21 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \
22 OpenCloseBrowserWindowWithAccelerator 22 OpenCloseBrowserWindowWithAccelerator
23 #endif 23 #endif
24 24
25 // http://code.google.com/p/chromium/issues/detail?id=14774
26 #if defined(OS_WIN) && !defined(NDEBUG)
27 #define MAYBE_CloseTab DISABLED_CloseTab
28 #define MAYBE_CloseBrowserWindow DISABLED_CloseBrowserWindow
29 #else
30 #define MAYBE_CloseTab CloseTab
31 #define MAYBE_CloseBrowserWindow CloseBrowserWindow
32 #endif
33
25 TEST_F(AutomatedUITestBase, NewTab) { 34 TEST_F(AutomatedUITestBase, NewTab) {
26 int tab_count; 35 int tab_count;
27 active_browser()->GetTabCount(&tab_count); 36 active_browser()->GetTabCount(&tab_count);
28 ASSERT_EQ(1, tab_count); 37 ASSERT_EQ(1, tab_count);
29 NewTab(); 38 NewTab();
30 active_browser()->GetTabCount(&tab_count); 39 active_browser()->GetTabCount(&tab_count);
31 ASSERT_EQ(2, tab_count); 40 ASSERT_EQ(2, tab_count);
32 NewTab(); 41 NewTab();
33 active_browser()->GetTabCount(&tab_count); 42 active_browser()->GetTabCount(&tab_count);
34 ASSERT_EQ(3, tab_count); 43 ASSERT_EQ(3, tab_count);
(...skipping 22 matching lines...) Expand all
57 GURL test_url = net::FilePathToFileURL(path_prefix.AppendASCII("bot1.html")); 66 GURL test_url = net::FilePathToFileURL(path_prefix.AppendASCII("bot1.html"));
58 GetActiveTab()->NavigateToURL(test_url); 67 GetActiveTab()->NavigateToURL(test_url);
59 CloseActiveTab(); 68 CloseActiveTab();
60 active_browser()->GetTabCount(&tab_count); 69 active_browser()->GetTabCount(&tab_count);
61 ASSERT_EQ(1, tab_count); 70 ASSERT_EQ(1, tab_count);
62 RestoreTab(); 71 RestoreTab();
63 active_browser()->GetTabCount(&tab_count); 72 active_browser()->GetTabCount(&tab_count);
64 ASSERT_EQ(2, tab_count); 73 ASSERT_EQ(2, tab_count);
65 } 74 }
66 75
67 TEST_F(AutomatedUITestBase, CloseTab) { 76 TEST_F(AutomatedUITestBase, MAYBE_CloseTab) {
68 int num_browser_windows; 77 int num_browser_windows;
69 int tab_count; 78 int tab_count;
70 NewTab(); 79 NewTab();
71 automation()->GetBrowserWindowCount(&num_browser_windows); 80 automation()->GetBrowserWindowCount(&num_browser_windows);
72 ASSERT_EQ(1, num_browser_windows); 81 ASSERT_EQ(1, num_browser_windows);
73 active_browser()->GetTabCount(&tab_count); 82 active_browser()->GetTabCount(&tab_count);
74 ASSERT_EQ(2, tab_count); 83 ASSERT_EQ(2, tab_count);
75 84
76 ASSERT_TRUE(OpenAndActivateNewBrowserWindow(NULL)); 85 ASSERT_TRUE(OpenAndActivateNewBrowserWindow(NULL));
77 NewTab(); 86 NewTab();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 CloseBrowser(browser_1.get(), &application_closed); 156 CloseBrowser(browser_1.get(), &application_closed);
148 ASSERT_FALSE(application_closed); 157 ASSERT_FALSE(application_closed);
149 automation()->GetBrowserWindowCount(&num_browser_windows); 158 automation()->GetBrowserWindowCount(&num_browser_windows);
150 ASSERT_EQ(2, num_browser_windows); 159 ASSERT_EQ(2, num_browser_windows);
151 CloseBrowser(browser_2.get(), &application_closed); 160 CloseBrowser(browser_2.get(), &application_closed);
152 ASSERT_FALSE(application_closed); 161 ASSERT_FALSE(application_closed);
153 automation()->GetBrowserWindowCount(&num_browser_windows); 162 automation()->GetBrowserWindowCount(&num_browser_windows);
154 ASSERT_EQ(1, num_browser_windows); 163 ASSERT_EQ(1, num_browser_windows);
155 } 164 }
156 165
157 TEST_F(AutomatedUITestBase, CloseBrowserWindow) { 166 TEST_F(AutomatedUITestBase, MAYBE_CloseBrowserWindow) {
158 int tab_count; 167 int tab_count;
159 NewTab(); 168 NewTab();
160 active_browser()->GetTabCount(&tab_count); 169 active_browser()->GetTabCount(&tab_count);
161 ASSERT_EQ(2, tab_count); 170 ASSERT_EQ(2, tab_count);
162 171
163 ASSERT_TRUE(OpenAndActivateNewBrowserWindow(NULL)); 172 ASSERT_TRUE(OpenAndActivateNewBrowserWindow(NULL));
164 NewTab(); 173 NewTab();
165 NewTab(); 174 NewTab();
166 active_browser()->GetTabCount(&tab_count); 175 active_browser()->GetTabCount(&tab_count);
167 ASSERT_EQ(3, tab_count); 176 ASSERT_EQ(3, tab_count);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 ASSERT_TRUE(BackButton()); 286 ASSERT_TRUE(BackButton());
278 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); 287 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url));
279 ASSERT_EQ(url1, url); 288 ASSERT_EQ(url1, url);
280 ASSERT_TRUE(ForwardButton()); 289 ASSERT_TRUE(ForwardButton());
281 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); 290 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url));
282 ASSERT_EQ(url2, url); 291 ASSERT_EQ(url2, url);
283 ASSERT_TRUE(ReloadPage()); 292 ASSERT_TRUE(ReloadPage());
284 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); 293 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url));
285 ASSERT_EQ(url2, url); 294 ASSERT_EQ(url2, url);
286 } 295 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_restore_uitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698