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

Side by Side Diff: chrome/test/perf/tab_switching_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/sunspider_uitest.cc ('k') | chrome/test/perf/url_fetch_test.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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/environment.h" 6 #include "base/environment.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 int tab_count = -1; 90 int tab_count = -1;
91 ASSERT_TRUE(browser_proxy_->GetTabCount(&tab_count)); 91 ASSERT_TRUE(browser_proxy_->GetTabCount(&tab_count));
92 ASSERT_EQ(initial_tab_count + new_tab_count, tab_count); 92 ASSERT_EQ(initial_tab_count + new_tab_count, tab_count);
93 93
94 // Switch linearly between tabs. 94 // Switch linearly between tabs.
95 ASSERT_TRUE(browser_proxy_->ActivateTab(0)); 95 ASSERT_TRUE(browser_proxy_->ActivateTab(0));
96 int final_tab_count = 0; 96 int final_tab_count = 0;
97 ASSERT_TRUE(browser_proxy_->GetTabCount(&final_tab_count)); 97 ASSERT_TRUE(browser_proxy_->GetTabCount(&final_tab_count));
98 for (int j = initial_tab_count; j < final_tab_count; ++j) { 98 for (int j = initial_tab_count; j < final_tab_count; ++j) {
99 ASSERT_TRUE(browser_proxy_->ActivateTab(j)); 99 ASSERT_TRUE(browser_proxy_->ActivateTab(j));
100 ASSERT_TRUE(browser_proxy_->WaitForTabToBecomeActive(j, 10000)); 100 ASSERT_TRUE(browser_proxy_->WaitForTabToBecomeActive(
101 j, base::TimeDelta::FromSeconds(10)));
101 } 102 }
102 103
103 // Close the browser to force a dump of log. 104 // Close the browser to force a dump of log.
104 bool application_closed = false; 105 bool application_closed = false;
105 EXPECT_TRUE(CloseBrowser(browser_proxy_.get(), &application_closed)); 106 EXPECT_TRUE(CloseBrowser(browser_proxy_.get(), &application_closed));
106 107
107 // Open the corresponding log file and collect average from the 108 // Open the corresponding log file and collect average from the
108 // histogram stats generated for RenderWidgetHost_TabSwitchPaintDuration. 109 // histogram stats generated for RenderWidgetHost_TabSwitchPaintDuration.
109 bool log_has_been_dumped = false; 110 bool log_has_been_dumped = false;
110 std::string contents; 111 std::string contents;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 RunTabSwitchingUITest("t", true); 192 RunTabSwitchingUITest("t", true);
192 } 193 }
193 194
194 // Started failing with a webkit roll in r49936. See http://crbug.com/46751 195 // Started failing with a webkit roll in r49936. See http://crbug.com/46751
195 TEST_F(TabSwitchingUITest, FAILS_TabSwitchRef) { 196 TEST_F(TabSwitchingUITest, FAILS_TabSwitchRef) {
196 UseReferenceBuild(); 197 UseReferenceBuild();
197 RunTabSwitchingUITest("t_ref", true); 198 RunTabSwitchingUITest("t_ref", true);
198 } 199 }
199 200
200 } // namespace 201 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/perf/sunspider_uitest.cc ('k') | chrome/test/perf/url_fetch_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698