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

Side by Side Diff: chrome/test/perf/startup_test.cc

Issue 10787010: Switch to TimeDelta interfaces in chrome automation test infrastructure. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase onto master. Created 8 years, 5 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
« no previous file with comments | « chrome/test/perf/page_cycler_test.cc ('k') | chrome/test/perf/sunspider_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 "base/environment.h" 5 #include "base/environment.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 if (num_tabs > 0) { 210 if (num_tabs > 0) {
211 float min_start; 211 float min_start;
212 float max_stop; 212 float max_stop;
213 std::vector<float> times; 213 std::vector<float> times;
214 scoped_refptr<BrowserProxy> browser_proxy( 214 scoped_refptr<BrowserProxy> browser_proxy(
215 automation()->GetBrowserWindow(0)); 215 automation()->GetBrowserWindow(0));
216 ASSERT_TRUE(browser_proxy.get()); 216 ASSERT_TRUE(browser_proxy.get());
217 217
218 if (browser_proxy->GetInitialLoadTimes( 218 if (browser_proxy->GetInitialLoadTimes(
219 TestTimeouts::action_max_timeout_ms(), 219 TestTimeouts::action_max_timeout(),
220 &min_start, 220 &min_start,
221 &max_stop, 221 &max_stop,
222 &times) && 222 &times) &&
223 !times.empty()) { 223 !times.empty()) {
224 ASSERT_LT(nth_timed_tab, num_tabs); 224 ASSERT_LT(nth_timed_tab, num_tabs);
225 ASSERT_EQ(times.size(), static_cast<size_t>(num_tabs)); 225 ASSERT_EQ(times.size(), static_cast<size_t>(num_tabs));
226 timings[i].first_start_ms = min_start; 226 timings[i].first_start_ms = min_start;
227 timings[i].last_stop_ms = max_stop; 227 timings[i].last_stop_ms = max_stop;
228 timings[i].first_stop_ms = times[0]; 228 timings[i].first_stop_ms = times[0];
229 timings[i].nth_tab_stop_ms = times[nth_timed_tab]; 229 timings[i].nth_tab_stop_ms = times[nth_timed_tab];
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 UITestBase::CUSTOM_FRAME, 0, 0); 479 UITestBase::CUSTOM_FRAME, 0, 0);
480 } 480 }
481 481
482 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { 482 TEST_F(StartupTest, PerfNativeFrameGtkTheme) {
483 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, 483 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT,
484 UITestBase::CUSTOM_FRAME_NATIVE_THEME, 0, 0); 484 UITestBase::CUSTOM_FRAME_NATIVE_THEME, 0, 0);
485 } 485 }
486 #endif 486 #endif
487 487
488 } // namespace 488 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/perf/page_cycler_test.cc ('k') | chrome/test/perf/sunspider_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698