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

Side by Side Diff: chrome/test/perf/kraken_benchmark_uitest.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/indexeddb_uitest.cc ('k') | chrome/test/perf/page_cycler_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 #include "base/command_line.h" 4 #include "base/command_line.h"
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 PrintResults(tab.get()); 50 PrintResults(tab.get());
51 } 51 }
52 52
53 protected: 53 protected:
54 bool reference_; // True if this is a reference build. 54 bool reference_; // True if this is a reference build.
55 55
56 private: 56 private:
57 bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) { 57 bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) {
58 return WaitUntilCookieValue(tab, test_url, "__done", 58 return WaitUntilCookieValue(tab, test_url, "__done",
59 TestTimeouts::large_test_timeout_ms(), "1"); 59 TestTimeouts::large_test_timeout(), "1");
60 } 60 }
61 61
62 bool GetResults(TabProxy* tab, ResultsMap* results) { 62 bool GetResults(TabProxy* tab, ResultsMap* results) {
63 std::wstring json_wide; 63 std::wstring json_wide;
64 bool succeeded = tab->ExecuteAndExtractString(L"", 64 bool succeeded = tab->ExecuteAndExtractString(L"",
65 L"window.domAutomationController.send(" 65 L"window.domAutomationController.send("
66 L" automation.getResults());", 66 L" automation.getResults());",
67 &json_wide); 67 &json_wide);
68 68
69 EXPECT_TRUE(succeeded); 69 EXPECT_TRUE(succeeded);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 TEST_F(KrakenBenchmarkReferenceTest, Perf) { 116 TEST_F(KrakenBenchmarkReferenceTest, Perf) {
117 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunKraken)) 117 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunKraken))
118 return; 118 return;
119 119
120 RunTest(); 120 RunTest();
121 } 121 }
122 122
123 } // namespace 123 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/perf/indexeddb_uitest.cc ('k') | chrome/test/perf/page_cycler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698