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

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

Issue 10736064: Switch to TimeDelta interfaces in chrome automation test infrastructure. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 if (num_tabs > 0) { 195 if (num_tabs > 0) {
196 float min_start; 196 float min_start;
197 float max_stop; 197 float max_stop;
198 std::vector<float> times; 198 std::vector<float> times;
199 scoped_refptr<BrowserProxy> browser_proxy( 199 scoped_refptr<BrowserProxy> browser_proxy(
200 automation()->GetBrowserWindow(0)); 200 automation()->GetBrowserWindow(0));
201 ASSERT_TRUE(browser_proxy.get()); 201 ASSERT_TRUE(browser_proxy.get());
202 202
203 if (browser_proxy->GetInitialLoadTimes( 203 if (browser_proxy->GetInitialLoadTimes(
204 TestTimeouts::action_max_timeout_ms(), 204 TestTimeouts::action_max_timeout(),
205 &min_start, 205 &min_start,
206 &max_stop, 206 &max_stop,
207 &times) && 207 &times) &&
208 !times.empty()) { 208 !times.empty()) {
209 ASSERT_LT(nth_timed_tab, num_tabs); 209 ASSERT_LT(nth_timed_tab, num_tabs);
210 ASSERT_EQ(times.size(), static_cast<size_t>(num_tabs)); 210 ASSERT_EQ(times.size(), static_cast<size_t>(num_tabs));
211 timings[i].first_start_ms = min_start; 211 timings[i].first_start_ms = min_start;
212 timings[i].last_stop_ms = max_stop; 212 timings[i].last_stop_ms = max_stop;
213 timings[i].first_stop_ms = times[0]; 213 timings[i].first_stop_ms = times[0];
214 timings[i].nth_tab_stop_ms = times[nth_timed_tab]; 214 timings[i].nth_tab_stop_ms = times[nth_timed_tab];
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 UITestBase::CUSTOM_FRAME, 0, 0); 454 UITestBase::CUSTOM_FRAME, 0, 0);
455 } 455 }
456 456
457 TEST_F(StartupTest, PerfNativeFrameGtkTheme) { 457 TEST_F(StartupTest, PerfNativeFrameGtkTheme) {
458 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT, 458 RunStartupTest("warm", "custom-frame-gtk-theme", WARM, NOT_IMPORTANT,
459 UITestBase::CUSTOM_FRAME_NATIVE_THEME, 0, 0); 459 UITestBase::CUSTOM_FRAME_NATIVE_THEME, 0, 0);
460 } 460 }
461 #endif 461 #endif
462 462
463 } // namespace 463 } // 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