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

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

Issue 7185023: Support Chromium-branded builds and cleanup reference build usage. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: . Created 9 years, 6 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
OLDNEW
1 // Copyright (c) 2011 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/test/test_timeouts.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 DISALLOW_COPY_AND_ASSIGN(V8BenchmarkTest); 117 DISALLOW_COPY_AND_ASSIGN(V8BenchmarkTest);
118 }; 118 };
119 119
120 class V8BenchmarkReferenceTest : public V8BenchmarkTest { 120 class V8BenchmarkReferenceTest : public V8BenchmarkTest {
121 public: 121 public:
122 V8BenchmarkReferenceTest() : V8BenchmarkTest() { 122 V8BenchmarkReferenceTest() : V8BenchmarkTest() {
123 reference_ = true; 123 reference_ = true;
124 } 124 }
125 125
126 // Override the browser directory that is used by UITest::SetUp to cause it
127 // to use the reference build instead.
128 void SetUp() { 126 void SetUp() {
129 FilePath dir; 127 UseReferenceBuild();
130 PathService::Get(chrome::DIR_TEST_TOOLS, &dir); 128 V8BenchmarkTest::SetUp();
131 dir = dir.AppendASCII("reference_build");
132 #if defined(OS_WIN)
133 dir = dir.AppendASCII("chrome");
134 #elif defined(OS_LINUX)
135 dir = dir.AppendASCII("chrome_linux");
136 #elif defined(OS_MACOSX)
137 dir = dir.AppendASCII("chrome_mac");
138 #endif
139 browser_directory_ = dir;
140 UITest::SetUp();
141 } 129 }
142 }; 130 };
143 131
144 TEST_F(V8BenchmarkTest, Perf) { 132 TEST_F(V8BenchmarkTest, Perf) {
145 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunV8Benchmark)) 133 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunV8Benchmark))
146 return; 134 return;
147 135
148 RunTest(); 136 RunTest();
149 } 137 }
150 138
151 TEST_F(V8BenchmarkReferenceTest, Perf) { 139 TEST_F(V8BenchmarkReferenceTest, Perf) {
152 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunV8Benchmark)) 140 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunV8Benchmark))
153 return; 141 return;
154 142
155 RunTest(); 143 RunTest();
156 } 144 }
157 145
158 } // namespace 146 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698