Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 UIPerfTest::UseReferenceBuild(); |
|
cmp
2011/06/16 23:29:40
just UseReferenceBuild();
| |
| 133 PathService::Get(chrome::DIR_TEST_TOOLS, &dir); | |
| 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(); | 131 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 } |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 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 |
| OLD | NEW |