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

Side by Side Diff: chrome/test/perf/frame_rate/frame_rate_tests.cc

Issue 12093083: Temporarily makes use_aura the default on windows so we can get perf (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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
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 <map> 5 #include <map>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void RunTest(const std::string& name) { 138 void RunTest(const std::string& name) {
139 #if defined(OS_WIN) 139 #if defined(OS_WIN)
140 if (HasFlag(kUseGpu) && HasFlag(kIsGpuCanvasTest) && 140 if (HasFlag(kUseGpu) && HasFlag(kIsGpuCanvasTest) &&
141 base::win::OSInfo::GetInstance()->version() == base::win::VERSION_XP) { 141 base::win::OSInfo::GetInstance()->version() == base::win::VERSION_XP) {
142 // crbug.com/128208 142 // crbug.com/128208
143 LOG(WARNING) << "Test skipped: GPU canvas tests do not run on XP."; 143 LOG(WARNING) << "Test skipped: GPU canvas tests do not run on XP.";
144 return; 144 return;
145 } 145 }
146 #endif 146 #endif
147 147
148 if (HasFlag(kUseGpu) && !IsGpuAvailable()) { 148 if (HasFlag(kUseGpu) && !IsGpuAvailable()) {
jbates 2013/01/31 17:08:39 If this Aura run is meant to stay, best to put the
149 printf("Test skipped: requires gpu. Pass --enable-gpu on the command " 149 printf("Test skipped: requires gpu. Pass --enable-gpu on the command "
150 "line if use of GPU is desired.\n"); 150 "line if use of GPU is desired.\n");
151 return; 151 return;
152 } 152 }
153 153
154 // Verify flag combinations. 154 // Verify flag combinations.
155 ASSERT_TRUE(HasFlag(kUseGpu) || !HasFlag(kForceGpuComposited)); 155 ASSERT_TRUE(HasFlag(kUseGpu) || !HasFlag(kForceGpuComposited));
156 ASSERT_TRUE(!HasFlag(kUseGpu) || IsGpuAvailable()); 156 ASSERT_TRUE(!HasFlag(kUseGpu) || IsGpuAvailable());
157 157
158 FilePath test_path = GetDataPath(name); 158 FilePath test_path = GetDataPath(name);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 // Start the tests. 201 // Start the tests.
202 ASSERT_TRUE(tab->NavigateToURLAsync(GURL("javascript:__start_all();"))); 202 ASSERT_TRUE(tab->NavigateToURLAsync(GURL("javascript:__start_all();")));
203 203
204 // Block until the tests completes. 204 // Block until the tests completes.
205 ASSERT_TRUE(WaitUntilJavaScriptCondition( 205 ASSERT_TRUE(WaitUntilJavaScriptCondition(
206 tab, L"", L"window.domAutomationController.send(!__running_all);", 206 tab, L"", L"window.domAutomationController.send(!__running_all);",
207 TestTimeouts::large_test_timeout())); 207 TestTimeouts::large_test_timeout()));
208 208
209 // Aura is always accelerated.
210 #if !defined(USE_AURA)
209 // TODO(jbates): remove this check when ref builds are updated. 211 // TODO(jbates): remove this check when ref builds are updated.
210 if (!HasFlag(kUseReferenceBuild)) { 212 if (!HasFlag(kUseReferenceBuild)) {
211 std::string json_events; 213 std::string json_events;
212 ASSERT_TRUE(automation()->EndTracing(&json_events)); 214 ASSERT_TRUE(automation()->EndTracing(&json_events));
213 215
214 bool did_run_on_gpu = DidRunOnGpu(json_events); 216 bool did_run_on_gpu = DidRunOnGpu(json_events);
215 bool expect_gpu = HasFlag(kUseGpu); 217 bool expect_gpu = HasFlag(kUseGpu);
216 EXPECT_EQ(expect_gpu, did_run_on_gpu); 218 EXPECT_EQ(expect_gpu, did_run_on_gpu);
217 } 219 }
220 #endif
218 221
219 // Read out the results. 222 // Read out the results.
220 std::wstring json; 223 std::wstring json;
221 ASSERT_TRUE(tab->ExecuteAndExtractString( 224 ASSERT_TRUE(tab->ExecuteAndExtractString(
222 L"", 225 L"",
223 L"window.domAutomationController.send(" 226 L"window.domAutomationController.send("
224 L"JSON.stringify(__calc_results_total()));", 227 L"JSON.stringify(__calc_results_total()));",
225 &json)); 228 &json));
226 229
227 std::map<std::string, std::string> results; 230 std::map<std::string, std::string> results;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, 307 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync,
305 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, 308 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu,
306 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | 309 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu |
307 kDisableVsync)); 310 kDisableVsync));
308 311
309 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) 312 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies)
310 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) 313 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE)
311 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) 314 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading)
312 315
313 } // namespace 316 } // namespace
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | chrome/test/ui/ui_test.cc » ('j') | chrome/test/ui/ui_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698