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

Side by Side Diff: chrome/test/startup/feature_startup_test.cc

Issue 427005: Try to make the start up tests less flaky by switching (Closed)
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « no previous file | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/gfx/rect.h" 6 #include "base/gfx/rect.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/perftimer.h" 8 #include "base/perftimer.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // TODO(port): SetBounds returns false when not implemented. 73 // TODO(port): SetBounds returns false when not implemented.
74 // It is OK to comment out the resize since it will still be useful to 74 // It is OK to comment out the resize since it will still be useful to
75 // test the default size of the window. 75 // test the default size of the window.
76 ASSERT_TRUE(window->GetWindow().get()->SetBounds(gfx::Rect(1000, 1000))); 76 ASSERT_TRUE(window->GetWindow().get()->SetBounds(gfx::Rect(1000, 1000)));
77 #endif 77 #endif
78 int tab_count = -1; 78 int tab_count = -1;
79 ASSERT_TRUE(window->GetTabCount(&tab_count)); 79 ASSERT_TRUE(window->GetTabCount(&tab_count));
80 ASSERT_EQ(1, tab_count); 80 ASSERT_EQ(1, tab_count);
81 81
82 // Hit ctl-t and wait for the tab to load. 82 // Hit ctl-t and wait for the tab to load.
83 window->ApplyAccelerator(IDC_NEW_TAB); 83 window->RunCommand(IDC_NEW_TAB);
84 ASSERT_TRUE(window->WaitForTabCountToBecome(2, 5000)); 84 ASSERT_TRUE(window->GetTabCount(&tab_count));
85 ASSERT_EQ(2, tab_count);
85 int load_time; 86 int load_time;
86 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time)); 87 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
87 88
88 if (want_warm) { 89 if (want_warm) {
89 // Bring up a second tab, now that we've already shown one tab. 90 // Bring up a second tab, now that we've already shown one tab.
90 window->ApplyAccelerator(IDC_NEW_TAB); 91 window->RunCommand(IDC_NEW_TAB);
91 ASSERT_TRUE(window->WaitForTabCountToBecome(3, 5000)); 92 ASSERT_TRUE(window->GetTabCount(&tab_count));
93 ASSERT_EQ(3, tab_count);
92 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time)); 94 ASSERT_TRUE(automation()->WaitForInitialNewTabUILoad(&load_time));
93 } 95 }
94 timings[i] = TimeDelta::FromMilliseconds(load_time); 96 timings[i] = TimeDelta::FromMilliseconds(load_time);
95 97
96 window = NULL; 98 window = NULL;
97 UITest::TearDown(); 99 UITest::TearDown();
98 } 100 }
99 101
100 PrintTimings(label, timings, important); 102 PrintTimings(label, timings, important);
101 } 103 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 194 }
193 195
194 TEST_F(NewTabUIStartupTest, NativeFrameGtkThemeCold) { 196 TEST_F(NewTabUIStartupTest, NativeFrameGtkThemeCold) {
195 RunStartupTest("tab_custom_frame_gtk_theme_cold", false /* cold */, 197 RunStartupTest("tab_custom_frame_gtk_theme_cold", false /* cold */,
196 false /* not important */, 198 false /* not important */,
197 UITest::CUSTOM_FRAME_NATIVE_THEME); 199 UITest::CUSTOM_FRAME_NATIVE_THEME);
198 } 200 }
199 #endif 201 #endif
200 202
201 } // namespace 203 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698