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

Side by Side Diff: chrome/test/perf/page_cycler_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/kraken_benchmark_uitest.cc ('k') | chrome/test/perf/startup_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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.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/path_service.h" 9 #include "base/path_service.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 GURL test_url; 194 GURL test_url;
195 GetTestUrl(name, use_http, &test_url); 195 GetTestUrl(name, use_http, &test_url);
196 196
197 scoped_refptr<TabProxy> tab(GetActiveTab()); 197 scoped_refptr<TabProxy> tab(GetActiveTab());
198 ASSERT_TRUE(tab.get()); 198 ASSERT_TRUE(tab.get());
199 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url)); 199 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url));
200 200
201 // Wait for the test to finish. 201 // Wait for the test to finish.
202 ASSERT_TRUE(WaitUntilCookieValue( 202 ASSERT_TRUE(WaitUntilCookieValue(
203 tab.get(), test_url, "__pc_done", 203 tab.get(), test_url, "__pc_done",
204 TestTimeouts::large_test_timeout_ms(), "1")); 204 TestTimeouts::large_test_timeout(), "1"));
205 205
206 std::string cookie; 206 std::string cookie;
207 ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie)); 207 ASSERT_TRUE(tab->GetCookieByName(test_url, "__pc_pages", &cookie));
208 pages->assign(UTF8ToWide(cookie)); 208 pages->assign(UTF8ToWide(cookie));
209 ASSERT_FALSE(pages->empty()); 209 ASSERT_FALSE(pages->empty());
210 210
211 // Wait for the report.html to be loaded. 211 // Wait for the report.html to be loaded.
212 ASSERT_TRUE(WaitUntilCookieValue( 212 ASSERT_TRUE(WaitUntilCookieValue(
213 tab.get(), test_url, "__navigated_to_report", 213 tab.get(), test_url, "__navigated_to_report",
214 TestTimeouts::action_max_timeout_ms(), "1")); 214 TestTimeouts::action_max_timeout(), "1"));
215 215
216 // Get the timing cookie value from the DOM automation. 216 // Get the timing cookie value from the DOM automation.
217 std::wstring wcookie; 217 std::wstring wcookie;
218 ASSERT_TRUE(tab->ExecuteAndExtractString(L"", 218 ASSERT_TRUE(tab->ExecuteAndExtractString(L"",
219 L"window.domAutomationController.send(" 219 L"window.domAutomationController.send("
220 L"JSON.stringify(__get_timings()));", 220 L"JSON.stringify(__get_timings()));",
221 &wcookie)); 221 &wcookie));
222 cookie = base::SysWideToNativeMB(wcookie); 222 cookie = base::SysWideToNativeMB(wcookie);
223 223
224 // JSON.stringify() encapsulates the returned string in quotes, strip them. 224 // JSON.stringify() encapsulates the returned string in quotes, strip them.
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 PAGE_CYCLER_DATABASE_TESTS("delete-transactions", 630 PAGE_CYCLER_DATABASE_TESTS("delete-transactions",
631 DeleteTransactions); 631 DeleteTransactions);
632 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions", 632 PAGE_CYCLER_DATABASE_TESTS("pseudo-random-transactions",
633 PseudoRandomTransactions); 633 PseudoRandomTransactions);
634 #endif 634 #endif
635 635
636 // Indexed DB tests. 636 // Indexed DB tests.
637 PAGE_CYCLER_IDB_TESTS("basic_insert", BasicInsert); 637 PAGE_CYCLER_IDB_TESTS("basic_insert", BasicInsert);
638 638
639 } // namespace 639 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/perf/kraken_benchmark_uitest.cc ('k') | chrome/test/perf/startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698