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

Side by Side Diff: chrome/test/perf/dromaeo_benchmark_uitest.cc

Issue 10868114: Split out Dromaeo DOM and JSLib tests into smaller components. Will remove large tests after buildb… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed copy/paste of flag check. Created 8 years, 3 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 | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 16 matching lines...) Expand all
27 class DromaeoTest : public UIPerfTest { 27 class DromaeoTest : public UIPerfTest {
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 DromaeoTest() : reference_(false) { 31 DromaeoTest() : reference_(false) {
32 dom_automation_enabled_ = true; 32 dom_automation_enabled_ = true;
33 show_window_ = true; 33 show_window_ = true;
34 } 34 }
35 35
36 void RunTest(const std::string& suite) { 36 void RunTest(const std::string& suite) {
37 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo))
38 return;
37 FilePath test_path = GetDromaeoDir(); 39 FilePath test_path = GetDromaeoDir();
38 std::string query_string = suite + "&automated"; 40 std::string query_string = suite + "&automated";
39 test_path = test_path.Append(FILE_PATH_LITERAL("index.html")); 41 test_path = test_path.Append(FILE_PATH_LITERAL("index.html"));
40 GURL test_url(content::GetFileUrlWithQuery(test_path, query_string)); 42 GURL test_url(content::GetFileUrlWithQuery(test_path, query_string));
41 43
42 scoped_refptr<TabProxy> tab(GetActiveTab()); 44 scoped_refptr<TabProxy> tab(GetActiveTab());
43 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url)); 45 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url));
44 46
45 // Wait for the test to finish. 47 // Wait for the test to finish.
46 ASSERT_TRUE(WaitUntilTestCompletes(tab.get(), test_url)); 48 ASSERT_TRUE(WaitUntilTestCompletes(tab.get(), test_url));
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 136 }
135 }; 137 };
136 138
137 #if defined(OS_WIN) 139 #if defined(OS_WIN)
138 // http://crbug.com/134570 - is flaky on Win7 perf bot 140 // http://crbug.com/134570 - is flaky on Win7 perf bot
139 #define MAYBE_DOMCorePerf DISABLED_DOMCorePerf 141 #define MAYBE_DOMCorePerf DISABLED_DOMCorePerf
140 #else 142 #else
141 #define MAYBE_DOMCorePerf DOMCorePerf 143 #define MAYBE_DOMCorePerf DOMCorePerf
142 #endif 144 #endif
143 TEST_F(DromaeoTest, MAYBE_DOMCorePerf) { 145 TEST_F(DromaeoTest, MAYBE_DOMCorePerf) {
144 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo))
145 return;
146
147 RunTest("dom"); 146 RunTest("dom");
148 } 147 }
149 148
149 TEST_F(DromaeoTest, DOMCoreAttrPerf) {
150 RunTest("dom-attr");
151 }
152
153 TEST_F(DromaeoTest, DOMCoreModifyPerf) {
154 RunTest("dom-modify");
155 }
156
157 TEST_F(DromaeoTest, DOMCoreQueryPerf) {
158 RunTest("dom-query");
159 }
160
161 TEST_F(DromaeoTest, DOMCoreTraversePerf) {
162 RunTest("dom-traverse");
163 }
164
150 TEST_F(DromaeoTest, JSLibPerf) { 165 TEST_F(DromaeoTest, JSLibPerf) {
151 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo))
152 return;
153
154 RunTest("jslib"); 166 RunTest("jslib");
155 } 167 }
156 168
169 TEST_F(DromaeoTest, JSLibAttrJqueryPerf) {
170 RunTest("jslib-attr-jquery");
171 }
172
173 TEST_F(DromaeoTest, JSLibAttrPrototypePerf) {
174 RunTest("jslib-attr-prototype");
175 }
176
177 TEST_F(DromaeoTest, JSLibEventJqueryPerf) {
178 RunTest("jslib-event-jquery");
179 }
180
181 TEST_F(DromaeoTest, JSLibEventPrototypePerf) {
182 RunTest("jslib-event-prototype");
183 }
184
185 TEST_F(DromaeoTest, JSLibModifyJqueryPerf) {
186 RunTest("jslib-modify-jquery");
187 }
188
189 TEST_F(DromaeoTest, JSLibModifyPrototypePerf) {
190 RunTest("jslib-modify-prototype");
191 }
192
193 TEST_F(DromaeoTest, JSLibTraverseJqueryPerf) {
194 RunTest("jslib-traverse-jquery");
195 }
196
197 TEST_F(DromaeoTest, JSLibTraversePrototypePerf) {
198 RunTest("jslib-traverse-prototype");
199 }
200
201 TEST_F(DromaeoTest, JSLibStyleJqueryPerf) {
202 RunTest("jslib-style-jquery");
203 }
204
205 TEST_F(DromaeoTest, JSLibStylePrototypePerf) {
206 RunTest("jslib-style-prototype");
207 }
208
157 TEST_F(DromaeoReferenceTest, MAYBE_DOMCorePerf) { 209 TEST_F(DromaeoReferenceTest, MAYBE_DOMCorePerf) {
158 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo))
159 return;
160
161 RunTest("dom"); 210 RunTest("dom");
162 } 211 }
163 212
213 TEST_F(DromaeoReferenceTest, DOMCoreAttrPerf) {
214 RunTest("dom-attr");
215 }
216
217 TEST_F(DromaeoReferenceTest, DOMCoreModifyPerf) {
218 RunTest("dom-modify");
219 }
220
221 TEST_F(DromaeoReferenceTest, DOMCoreQueryPerf) {
222 RunTest("dom-query");
223 }
224
225 TEST_F(DromaeoReferenceTest, DOMCoreTraversePerf) {
226 RunTest("dom-traverse");
227 }
228
164 TEST_F(DromaeoReferenceTest, JSLibPerf) { 229 TEST_F(DromaeoReferenceTest, JSLibPerf) {
165 if (!CommandLine::ForCurrentProcess()->HasSwitch(kRunDromaeo)) 230 RunTest("jslib");
166 return; 231 }
167 232
168 RunTest("jslib"); 233 TEST_F(DromaeoReferenceTest, JSLibAttrJqueryPerf) {
234 RunTest("jslib-attr-jquery");
235 }
236
237 TEST_F(DromaeoReferenceTest, JSLibAttrPrototypePerf) {
238 RunTest("jslib-attr-prototype");
239 }
240
241 TEST_F(DromaeoReferenceTest, JSLibEventJqueryPerf) {
242 RunTest("jslib-event-jquery");
243 }
244
245 TEST_F(DromaeoReferenceTest, JSLibEventPrototypePerf) {
246 RunTest("jslib-event-prototype");
247 }
248
249 TEST_F(DromaeoReferenceTest, JSLibModifyJqueryPerf) {
250 RunTest("jslib-modify-jquery");
251 }
252
253 TEST_F(DromaeoReferenceTest, JSLibModifyPrototypePerf) {
254 RunTest("jslib-modify-prototype");
255 }
256
257 TEST_F(DromaeoReferenceTest, JSLibTraverseJqueryPerf) {
258 RunTest("jslib-traverse-jquery");
259 }
260
261 TEST_F(DromaeoReferenceTest, JSLibTraversePrototypePerf) {
262 RunTest("jslib-traverse-prototype");
263 }
264
265 TEST_F(DromaeoReferenceTest, JSLibStyleJqueryPerf) {
266 RunTest("jslib-style-jquery");
267 }
268
269 TEST_F(DromaeoReferenceTest, JSLibStylePrototypePerf) {
270 RunTest("jslib-style-prototype");
169 } 271 }
170 272
171 273
172 } // namespace 274 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698