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

Side by Side Diff: chrome/test/perf/rendering/throughput_tests.cc

Issue 10479018: Add base::RunLoop and update ui_test_utils to use it to reduce flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jar, phajdan feedback Created 8 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) 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/json/json_reader.h" 8 #include "base/json/json_reader.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } else { 190 } else {
191 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); 191 command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
192 command_line->AppendSwitch(switches::kDisableExperimentalWebGL); 192 command_line->AppendSwitch(switches::kDisableExperimentalWebGL);
193 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); 193 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas);
194 } 194 }
195 } 195 }
196 196
197 void Wait(int ms) { 197 void Wait(int ms) {
198 MessageLoop::current()->PostDelayedTask( 198 MessageLoop::current()->PostDelayedTask(
199 FROM_HERE, 199 FROM_HERE,
200 MessageLoop::QuitClosure(), 200 MessageLoop::QuitNowClosure(),
201 base::TimeDelta::FromMilliseconds(ms)); 201 base::TimeDelta::FromMilliseconds(ms));
202 ui_test_utils::RunMessageLoop(); 202 ui_test_utils::RunMessageLoop();
203 } 203 }
204 204
205 // Take snapshot of the current tab, encode it as PNG, and save to a SkBitmap. 205 // Take snapshot of the current tab, encode it as PNG, and save to a SkBitmap.
206 bool TabSnapShotToImage(SkBitmap* bitmap) { 206 bool TabSnapShotToImage(SkBitmap* bitmap) {
207 CHECK(bitmap); 207 CHECK(bitmap);
208 std::vector<unsigned char> png; 208 std::vector<unsigned char> png;
209 209
210 gfx::Rect root_bounds = browser()->window()->GetBounds(); 210 gfx::Rect root_bounds = browser()->window()->GetBounds();
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 558
559 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasManyImagesSW) { 559 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasManyImagesSW) {
560 RunCanvasBenchTest("many_images", kNone); 560 RunCanvasBenchTest("many_images", kNone);
561 } 561 }
562 562
563 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { 563 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) {
564 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); 564 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest);
565 } 565 }
566 566
567 } // namespace 567 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698