OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/values.h" | 10 #include "base/values.h" |
11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
13 #include "chrome/common/json_value_serializer.h" | 13 #include "chrome/common/json_value_serializer.h" |
14 #include "chrome/test/automation/tab_proxy.h" | 14 #include "chrome/test/automation/tab_proxy.h" |
15 #include "chrome/test/ui/javascript_test_util.h" | 15 #include "chrome/test/ui/javascript_test_util.h" |
16 #include "chrome/test/ui/ui_test.h" | 16 #include "chrome/test/ui/ui_test.h" |
17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
18 #include "net/base/net_util.h" | 18 #include "net/base/net_util.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 static const FilePath::CharType kStartFile[] = | 22 static const FilePath::CharType kStartFile[] = |
23 FILE_PATH_LITERAL("run.html"); | 23 FILE_PATH_LITERAL("run.html"); |
24 | 24 |
25 const wchar_t kRunV8Benchmark[] = L"run-v8-benchmark"; | 25 const char kRunV8Benchmark[] = "run-v8-benchmark"; |
26 | 26 |
27 class V8BenchmarkTest : public UITest { | 27 class V8BenchmarkTest : public UITest { |
28 public: | 28 public: |
29 typedef std::map<std::string, std::string> ResultsMap; | 29 typedef std::map<std::string, std::string> ResultsMap; |
30 | 30 |
31 V8BenchmarkTest() : reference_(false) { | 31 V8BenchmarkTest() : reference_(false) { |
32 dom_automation_enabled_ = true; | 32 dom_automation_enabled_ = true; |
33 show_window_ = true; | 33 show_window_ = true; |
34 } | 34 } |
35 | 35 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 } | 147 } |
148 | 148 |
149 TEST_F(V8BenchmarkReferenceTest, Perf) { | 149 TEST_F(V8BenchmarkReferenceTest, Perf) { |
150 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunV8Benchmark)) | 150 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunV8Benchmark)) |
151 return; | 151 return; |
152 | 152 |
153 RunTest(); | 153 RunTest(); |
154 } | 154 } |
155 | 155 |
156 } // namespace | 156 } // namespace |
OLD | NEW |