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

Side by Side Diff: chrome/test/ui/dromaeo_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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 DISALLOW_COPY_AND_ASSIGN(DromaeoTest); 120 DISALLOW_COPY_AND_ASSIGN(DromaeoTest);
121 }; 121 };
122 122
123 class DromaeoReferenceTest : public DromaeoTest { 123 class DromaeoReferenceTest : public DromaeoTest {
124 public: 124 public:
125 DromaeoReferenceTest() : DromaeoTest() { 125 DromaeoReferenceTest() : DromaeoTest() {
126 reference_ = true; 126 reference_ = true;
127 } 127 }
128 128
129 // Override the browser directory that is used by UITest::SetUp to cause it
130 // to use the reference build instead.
131 void SetUp() { 129 void SetUp() {
132 FilePath dir; 130 UseReferenceBuild();
133 PathService::Get(chrome::DIR_TEST_TOOLS, &dir); 131 DromaeoTest::SetUp();
134 dir = dir.AppendASCII("reference_build");
135 #if defined(OS_WIN)
136 dir = dir.AppendASCII("chrome");
137 #elif defined(OS_LINUX)
138 dir = dir.AppendASCII("chrome_linux");
139 #elif defined(OS_MACOSX)
140 dir = dir.AppendASCII("chrome_mac");
141 #endif
142 browser_directory_ = dir;
143 UITest::SetUp();
144 } 132 }
145 }; 133 };
146 134
147 TEST_F(DromaeoTest, DOMCorePerf) { 135 TEST_F(DromaeoTest, DOMCorePerf) {
148 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo)) 136 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo))
149 return; 137 return;
150 138
151 RunTest("dom"); 139 RunTest("dom");
152 } 140 }
153 141
(...skipping 13 matching lines...) Expand all
167 155
168 TEST_F(DromaeoReferenceTest, JSLibPerf) { 156 TEST_F(DromaeoReferenceTest, JSLibPerf) {
169 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo)) 157 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo))
170 return; 158 return;
171 159
172 RunTest("jslib"); 160 RunTest("jslib");
173 } 161 }
174 162
175 163
176 } // namespace 164 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698