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

Unified Diff: third_party/WebKit/PerformanceTests/Canvas/resources/canvas_runner.js

Issue 2858783003: Refactor prepareToMeasureValuesAsync to startMeasureValuesAsyn which run test through callback (Closed)
Patch Set: Address Xianzhu's review comments Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/PerformanceTests/Canvas/resources/canvas_runner.js
diff --git a/third_party/WebKit/PerformanceTests/Canvas/resources/canvas_runner.js b/third_party/WebKit/PerformanceTests/Canvas/resources/canvas_runner.js
index 21c3fe11d5bf7597517a68c9d009a5bb17787b3d..34843e85db997a4bb7b3219ca30257198a87b549 100644
--- a/third_party/WebKit/PerformanceTests/Canvas/resources/canvas_runner.js
+++ b/third_party/WebKit/PerformanceTests/Canvas/resources/canvas_runner.js
@@ -9,14 +9,18 @@
var CanvasRunner = {};
CanvasRunner.start = function (test) {
- PerfTestRunner.prepareToMeasureValuesAsync({unit: 'runs/s',
- description: test.description, done: testDone});
- if (!test.doRun) {
- CanvasRunner.logFatalError("doRun must be set.");
- return;
- }
- currentTest = test;
- runTest();
+ PerfTestRunner.startMeasureValuesAsync({
+ unit: 'runs/s',
+ description: test.description,
+ done: testDone,
+ run: function() {
+ if (!test.doRun) {
+ CanvasRunner.logFatalError("doRun must be set.");
+ return;
+ }
+ currentTest = test;
+ runTest();
+ }});
}
function runTest() {

Powered by Google App Engine
This is Rietveld 408576698