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

Side by Side Diff: chrome/test/ui/sunspider_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
« no previous file with comments | « chrome/test/ui/dromaeo_benchmark_uitest.cc ('k') | chrome/test/ui/ui_perf_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) 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_util.h" 6 #include "base/file_util.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/test/test_timeouts.h" 9 #include "base/test/test_timeouts.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 DISALLOW_COPY_AND_ASSIGN(SunSpiderTest); 115 DISALLOW_COPY_AND_ASSIGN(SunSpiderTest);
116 }; 116 };
117 117
118 class SunSpiderReferenceTest : public SunSpiderTest { 118 class SunSpiderReferenceTest : public SunSpiderTest {
119 public: 119 public:
120 SunSpiderReferenceTest() : SunSpiderTest() { 120 SunSpiderReferenceTest() : SunSpiderTest() {
121 reference_ = true; 121 reference_ = true;
122 } 122 }
123 123
124 // Override the browser directory that is used by UITest::SetUp to cause it
125 // to use the reference build instead.
126 void SetUp() { 124 void SetUp() {
127 FilePath dir; 125 UseReferenceBuild();
128 PathService::Get(chrome::DIR_TEST_TOOLS, &dir); 126 SunSpiderTest::SetUp();
129 dir = dir.AppendASCII("reference_build");
130 #if defined(OS_WIN)
131 dir = dir.AppendASCII("chrome");
132 #elif defined(OS_LINUX)
133 dir = dir.AppendASCII("chrome_linux");
134 #elif defined(OS_MACOSX)
135 dir = dir.AppendASCII("chrome_mac");
136 #endif
137 browser_directory_ = dir;
138 UITest::SetUp();
139 } 127 }
140 }; 128 };
141 129
142 TEST_F(SunSpiderTest, Perf) { 130 TEST_F(SunSpiderTest, Perf) {
143 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunSunSpider)) 131 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunSunSpider))
144 return; 132 return;
145 133
146 RunTest(); 134 RunTest();
147 } 135 }
148 136
149 TEST_F(SunSpiderReferenceTest, Perf) { 137 TEST_F(SunSpiderReferenceTest, Perf) {
150 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunSunSpider)) 138 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunSunSpider))
151 return; 139 return;
152 140
153 RunTest(); 141 RunTest();
154 } 142 }
155 143
156 } // namespace 144 } // namespace
OLDNEW
« no previous file with comments | « chrome/test/ui/dromaeo_benchmark_uitest.cc ('k') | chrome/test/ui/ui_perf_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698