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

Side by Side Diff: chrome/test/ui/v8_benchmark_uitest.cc

Issue 6188004: Remove test_timeout_ms and fix all the callers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | chrome/test/url_fetch_test/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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/test/test_timeouts.h"
10 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 #include "chrome/common/chrome_paths.h" 13 #include "chrome/common/chrome_paths.h"
13 #include "chrome/common/json_value_serializer.h" 14 #include "chrome/common/json_value_serializer.h"
14 #include "chrome/test/automation/tab_proxy.h" 15 #include "chrome/test/automation/tab_proxy.h"
15 #include "chrome/test/ui/javascript_test_util.h" 16 #include "chrome/test/ui/javascript_test_util.h"
16 #include "chrome/test/ui/ui_perf_test.h" 17 #include "chrome/test/ui/ui_perf_test.h"
17 #include "googleurl/src/gurl.h" 18 #include "googleurl/src/gurl.h"
18 #include "net/base/net_util.h" 19 #include "net/base/net_util.h"
19 20
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 private: 56 private:
56 // Return the path to the V8 benchmark directory on the local filesystem. 57 // Return the path to the V8 benchmark directory on the local filesystem.
57 FilePath GetV8BenchmarkDir() { 58 FilePath GetV8BenchmarkDir() {
58 FilePath test_dir; 59 FilePath test_dir;
59 PathService::Get(chrome::DIR_TEST_DATA, &test_dir); 60 PathService::Get(chrome::DIR_TEST_DATA, &test_dir);
60 return test_dir.AppendASCII("v8_benchmark"); 61 return test_dir.AppendASCII("v8_benchmark");
61 } 62 }
62 63
63 bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) { 64 bool WaitUntilTestCompletes(TabProxy* tab, const GURL& test_url) {
64 return WaitUntilCookieValue(tab, test_url, "__done", 65 return WaitUntilCookieValue(tab, test_url, "__done",
65 UITest::test_timeout_ms(), "1"); 66 TestTimeouts::huge_test_timeout_ms(), "1");
66 } 67 }
67 68
68 bool GetScore(TabProxy* tab, std::string* score) { 69 bool GetScore(TabProxy* tab, std::string* score) {
69 std::wstring score_wide; 70 std::wstring score_wide;
70 bool succeeded = tab->ExecuteAndExtractString(L"", 71 bool succeeded = tab->ExecuteAndExtractString(L"",
71 L"window.domAutomationController.send(automation.GetScore());", 72 L"window.domAutomationController.send(automation.GetScore());",
72 &score_wide); 73 &score_wide);
73 74
74 // Note that we don't use ASSERT_TRUE here (and in some other places) as it 75 // Note that we don't use ASSERT_TRUE here (and in some other places) as it
75 // doesn't work inside a function with a return type other than void. 76 // doesn't work inside a function with a return type other than void.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 149 }
149 150
150 TEST_F(V8BenchmarkReferenceTest, Perf) { 151 TEST_F(V8BenchmarkReferenceTest, Perf) {
151 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunV8Benchmark)) 152 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunV8Benchmark))
152 return; 153 return;
153 154
154 RunTest(); 155 RunTest();
155 } 156 }
156 157
157 } // namespace 158 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | chrome/test/url_fetch_test/url_fetch_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698