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

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

Issue 9358065: Flakiness cleanup: disable flaky tests under chrome/test/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/test/perf/startup_test.cc ('k') | chrome/test/ui/layout_plugin_uitest.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_command_ids.h" 5 #include "chrome/app/chrome_command_ids.h"
6 #include "chrome/common/url_constants.h" 6 #include "chrome/common/url_constants.h"
7 #include "chrome/test/automation/automation_proxy.h" 7 #include "chrome/test/automation/automation_proxy.h"
8 #include "chrome/test/automation/browser_proxy.h" 8 #include "chrome/test/automation/browser_proxy.h"
9 #include "chrome/test/automation/tab_proxy.h" 9 #include "chrome/test/automation/tab_proxy.h"
10 #include "chrome/test/reliability/automated_ui_test_base.h" 10 #include "chrome/test/reliability/automated_ui_test_base.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 CloseActiveTab(); 73 CloseActiveTab();
74 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count)); 74 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count));
75 ASSERT_EQ(1, tab_count); 75 ASSERT_EQ(1, tab_count);
76 RestoreTab(); 76 RestoreTab();
77 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count)); 77 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count));
78 ASSERT_EQ(2, tab_count); 78 ASSERT_EQ(2, tab_count);
79 } 79 }
80 80
81 #if defined(OS_WIN) 81 #if defined(OS_WIN)
82 // crbug.com/96049 82 // crbug.com/96049
83 #define MAYBE_CloseTab FLAKY_CloseTab 83 #define MAYBE_CloseTab DISABLED_CloseTab
84 #elif defined(OS_MACOSX) 84 #elif defined(OS_MACOSX)
85 // crbug.com/112821 85 // crbug.com/112821
86 #define MAYBE_CloseTab FLAKY_CloseTab 86 #define MAYBE_CloseTab DISABLED_CloseTab
87 #else 87 #else
88 #define MAYBE_CloseTab CloseTab 88 #define MAYBE_CloseTab CloseTab
89 #endif 89 #endif
90 90
91 TEST_F(AutomatedUITestBase, MAYBE_CloseTab) { 91 TEST_F(AutomatedUITestBase, MAYBE_CloseTab) {
92 int num_browser_windows; 92 int num_browser_windows;
93 int tab_count; 93 int tab_count;
94 NewTab(); 94 NewTab();
95 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); 95 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows));
96 ASSERT_EQ(1, num_browser_windows); 96 ASSERT_EQ(1, num_browser_windows);
(...skipping 29 matching lines...) Expand all
126 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count)); 126 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count));
127 ASSERT_EQ(1, tab_count); 127 ASSERT_EQ(1, tab_count);
128 128
129 // The last tab should not be closed. 129 // The last tab should not be closed.
130 ASSERT_FALSE(CloseActiveTab()); 130 ASSERT_FALSE(CloseActiveTab());
131 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count)); 131 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count));
132 ASSERT_EQ(1, tab_count); 132 ASSERT_EQ(1, tab_count);
133 } 133 }
134 134
135 // Flakiness tracked there: http://crbug.com/96049. 135 // Flakiness tracked there: http://crbug.com/96049.
136 TEST_F(AutomatedUITestBase, FLAKY_OpenBrowserWindow) { 136 TEST_F(AutomatedUITestBase, DISABLED_OpenBrowserWindow) {
137 int num_browser_windows; 137 int num_browser_windows;
138 int tab_count; 138 int tab_count;
139 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); 139 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows));
140 ASSERT_EQ(1, num_browser_windows); 140 ASSERT_EQ(1, num_browser_windows);
141 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count)); 141 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count));
142 ASSERT_EQ(1, tab_count); 142 ASSERT_EQ(1, tab_count);
143 143
144 scoped_refptr<BrowserProxy> browser_1; 144 scoped_refptr<BrowserProxy> browser_1;
145 ASSERT_TRUE(OpenAndActivateNewBrowserWindow(&browser_1)); 145 ASSERT_TRUE(OpenAndActivateNewBrowserWindow(&browser_1));
146 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); 146 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows));
(...skipping 27 matching lines...) Expand all
174 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); 174 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows));
175 ASSERT_EQ(2, num_browser_windows); 175 ASSERT_EQ(2, num_browser_windows);
176 CloseBrowser(browser_2.get(), &application_closed); 176 CloseBrowser(browser_2.get(), &application_closed);
177 ASSERT_FALSE(application_closed); 177 ASSERT_FALSE(application_closed);
178 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); 178 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows));
179 ASSERT_EQ(1, num_browser_windows); 179 ASSERT_EQ(1, num_browser_windows);
180 } 180 }
181 181
182 // Flaky, see http://crbug.com/96039. 182 // Flaky, see http://crbug.com/96039.
183 #if defined(OS_WIN) || defined(OS_MACOSX) 183 #if defined(OS_WIN) || defined(OS_MACOSX)
184 #define MAYBE_CloseBrowserWindow FLAKY_CloseBrowserWindow 184 #define MAYBE_CloseBrowserWindow DISABLED_CloseBrowserWindow
185 #else 185 #else
186 #define MAYBE_CloseBrowserWindow CloseBrowserWindow 186 #define MAYBE_CloseBrowserWindow CloseBrowserWindow
187 #endif 187 #endif
188 188
189 TEST_F(AutomatedUITestBase, MAYBE_CloseBrowserWindow) { 189 TEST_F(AutomatedUITestBase, MAYBE_CloseBrowserWindow) {
190 int tab_count; 190 int tab_count;
191 NewTab(); 191 NewTab();
192 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count)); 192 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count));
193 ASSERT_EQ(2, tab_count); 193 ASSERT_EQ(2, tab_count);
194 194
(...skipping 22 matching lines...) Expand all
217 ASSERT_TRUE(CloseActiveWindow()); 217 ASSERT_TRUE(CloseActiveWindow());
218 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count)); 218 ASSERT_TRUE(active_browser()->GetTabCount(&tab_count));
219 ASSERT_EQ(2, tab_count); 219 ASSERT_EQ(2, tab_count);
220 } 220 }
221 221
222 ASSERT_FALSE(CloseActiveWindow()); 222 ASSERT_FALSE(CloseActiveWindow());
223 } 223 }
224 224
225 // Flaky, see http://crbug.com/113046. 225 // Flaky, see http://crbug.com/113046.
226 #if defined(OS_MACOSX) 226 #if defined(OS_MACOSX)
227 #define MAYBE_IncognitoWindow FLAKY_IncognitoWindow 227 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow
228 #else 228 #else
229 #define MAYBE_IncognitoWindow IncognitoWindow 229 #define MAYBE_IncognitoWindow IncognitoWindow
230 #endif 230 #endif
231 231
232 TEST_F(AutomatedUITestBase, MAYBE_IncognitoWindow) { 232 TEST_F(AutomatedUITestBase, MAYBE_IncognitoWindow) {
233 int num_browser_windows; 233 int num_browser_windows;
234 int num_normal_browser_windows; 234 int num_normal_browser_windows;
235 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); 235 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows));
236 ASSERT_EQ(1, num_browser_windows); 236 ASSERT_EQ(1, num_browser_windows);
237 ASSERT_TRUE( 237 ASSERT_TRUE(
(...skipping 20 matching lines...) Expand all
258 ASSERT_TRUE(RunCommand(IDC_CLOSE_WINDOW)); 258 ASSERT_TRUE(RunCommand(IDC_CLOSE_WINDOW));
259 set_active_browser(automation()->GetBrowserWindow(0)); 259 set_active_browser(automation()->GetBrowserWindow(0));
260 ASSERT_TRUE(RunCommand(IDC_CLOSE_WINDOW)); 260 ASSERT_TRUE(RunCommand(IDC_CLOSE_WINDOW));
261 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); 261 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows));
262 ASSERT_EQ(1, num_browser_windows); 262 ASSERT_EQ(1, num_browser_windows);
263 } 263 }
264 264
265 // Flaky, see http://crbug.com/96039. 265 // Flaky, see http://crbug.com/96039.
266 #if defined(OS_WIN) 266 #if defined(OS_WIN)
267 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \ 267 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \
268 FLAKY_OpenCloseBrowserWindowWithAccelerator 268 DISABLED_OpenCloseBrowserWindowWithAccelerator
269 #else 269 #else
270 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \ 270 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \
271 OpenCloseBrowserWindowWithAccelerator 271 OpenCloseBrowserWindowWithAccelerator
272 #endif 272 #endif
273 273
274 TEST_F(AutomatedUITestBase, MAYBE_OpenCloseBrowserWindowWithAccelerator) { 274 TEST_F(AutomatedUITestBase, MAYBE_OpenCloseBrowserWindowWithAccelerator) {
275 // Note: we don't use RunCommand(IDC_OPEN/CLOSE_WINDOW) to open/close 275 // Note: we don't use RunCommand(IDC_OPEN/CLOSE_WINDOW) to open/close
276 // browser window in automated ui tests. Instead we use 276 // browser window in automated ui tests. Instead we use
277 // OpenAndActivateNewBrowserWindow and CloseActiveWindow. 277 // OpenAndActivateNewBrowserWindow and CloseActiveWindow.
278 // There are other parts of UI test that use the accelerators. This is 278 // There are other parts of UI test that use the accelerators. This is
(...skipping 23 matching lines...) Expand all
302 set_active_browser(automation()->GetBrowserWindow(0)); 302 set_active_browser(automation()->GetBrowserWindow(0));
303 ASSERT_TRUE(RunCommand(IDC_CLOSE_WINDOW)); 303 ASSERT_TRUE(RunCommand(IDC_CLOSE_WINDOW));
304 set_active_browser(automation()->GetBrowserWindow(0)); 304 set_active_browser(automation()->GetBrowserWindow(0));
305 ASSERT_TRUE(RunCommand(IDC_CLOSE_WINDOW)); 305 ASSERT_TRUE(RunCommand(IDC_CLOSE_WINDOW));
306 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); 306 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows));
307 ASSERT_EQ(1, num_browser_windows); 307 ASSERT_EQ(1, num_browser_windows);
308 } 308 }
309 309
310 // Flaky, see http://crbug.com/96039. 310 // Flaky, see http://crbug.com/96039.
311 #if defined(OS_MACOSX) 311 #if defined(OS_MACOSX)
312 #define MAYBE_Navigate FLAKY_Navigate 312 #define MAYBE_Navigate DISABLED_Navigate
313 #else 313 #else
314 #define MAYBE_Navigate Navigate 314 #define MAYBE_Navigate Navigate
315 #endif 315 #endif
316 316
317 TEST_F(AutomatedUITestBase, MAYBE_Navigate) { 317 TEST_F(AutomatedUITestBase, MAYBE_Navigate) {
318 FilePath path_prefix(test_data_directory_.AppendASCII("session_history")); 318 FilePath path_prefix(test_data_directory_.AppendASCII("session_history"));
319 GURL url1(net::FilePathToFileURL(path_prefix.AppendASCII("bot1.html"))); 319 GURL url1(net::FilePathToFileURL(path_prefix.AppendASCII("bot1.html")));
320 GURL url2(net::FilePathToFileURL(path_prefix.AppendASCII("bot2.html"))); 320 GURL url2(net::FilePathToFileURL(path_prefix.AppendASCII("bot2.html")));
321 GURL url3(net::FilePathToFileURL(path_prefix.AppendASCII("bot3.html"))); 321 GURL url3(net::FilePathToFileURL(path_prefix.AppendASCII("bot3.html")));
322 GURL url; 322 GURL url;
(...skipping 15 matching lines...) Expand all
338 ASSERT_TRUE(ForwardButton()); 338 ASSERT_TRUE(ForwardButton());
339 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); 339 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url));
340 ASSERT_EQ(url2, url); 340 ASSERT_EQ(url2, url);
341 ASSERT_TRUE(ReloadPage()); 341 ASSERT_TRUE(ReloadPage());
342 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); 342 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url));
343 ASSERT_EQ(url2, url); 343 ASSERT_EQ(url2, url);
344 } 344 }
345 345
346 // Flaky, see http://crbug.com/81050. 346 // Flaky, see http://crbug.com/81050.
347 #if defined(OS_MACOSX) 347 #if defined(OS_MACOSX)
348 #define MAYBE_SelectTab FLAKY_SelectTab 348 #define MAYBE_SelectTab DISABLED_SelectTab
349 #else 349 #else
350 #define MAYBE_SelectTab SelectTab 350 #define MAYBE_SelectTab SelectTab
351 #endif 351 #endif
352 352
353 TEST_F(AutomatedUITestBase, MAYBE_SelectTab) { 353 TEST_F(AutomatedUITestBase, MAYBE_SelectTab) {
354 FilePath filename(test_data_directory_); 354 FilePath filename(test_data_directory_);
355 filename = filename.AppendASCII("title2.html"); 355 filename = filename.AppendASCII("title2.html");
356 GURL url = net::FilePathToFileURL(filename); 356 GURL url = net::FilePathToFileURL(filename);
357 357
358 ASSERT_TRUE(active_browser()->AppendTab(url)); 358 ASSERT_TRUE(active_browser()->AppendTab(url));
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 412
413 TEST_F(AutomatedUITestBase, ShowDownloads) { 413 TEST_F(AutomatedUITestBase, ShowDownloads) {
414 ASSERT_TRUE(ShowDownloads()); 414 ASSERT_TRUE(ShowDownloads());
415 GURL url; 415 GURL url;
416 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); 416 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url));
417 ASSERT_EQ(GURL(chrome::kChromeUIDownloadsURL), url); 417 ASSERT_EQ(GURL(chrome::kChromeUIDownloadsURL), url);
418 } 418 }
419 419
420 // Flaky, see http://crbug.com/81050. 420 // Flaky, see http://crbug.com/81050.
421 #if defined(OS_MACOSX) 421 #if defined(OS_MACOSX)
422 #define MAYBE_ShowHistory FLAKY_ShowHistory 422 #define MAYBE_ShowHistory DISABLED_ShowHistory
423 #else 423 #else
424 #define MAYBE_ShowHistory ShowHistory 424 #define MAYBE_ShowHistory ShowHistory
425 #endif 425 #endif
426 426
427 TEST_F(AutomatedUITestBase, MAYBE_ShowHistory) { 427 TEST_F(AutomatedUITestBase, MAYBE_ShowHistory) {
428 ASSERT_TRUE(ShowHistory()); 428 ASSERT_TRUE(ShowHistory());
429 GURL url; 429 GURL url;
430 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); 430 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url));
431 ASSERT_EQ(GURL(chrome::kChromeUIHistoryURL), url); 431 ASSERT_EQ(GURL(chrome::kChromeUIHistoryURL), url);
432 } 432 }
OLDNEW
« no previous file with comments | « chrome/test/perf/startup_test.cc ('k') | chrome/test/ui/layout_plugin_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698