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

Unified Diff: third_party/WebKit/PerformanceTests/resources/runner.js

Issue 2858783003: Refactor prepareToMeasureValuesAsync to startMeasureValuesAsyn which run test through callback (Closed)
Patch Set: update 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
« no previous file with comments | « third_party/WebKit/PerformanceTests/Parser/html-parser-threaded.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/resources/runner.js
diff --git a/third_party/WebKit/PerformanceTests/resources/runner.js b/third_party/WebKit/PerformanceTests/resources/runner.js
index 3ce2eef328aa5c3d9f2c18c8ec46fe9551aa34bf..7c273b2537945acad178f1b6783e3751f7108cab 100644
--- a/third_party/WebKit/PerformanceTests/resources/runner.js
+++ b/third_party/WebKit/PerformanceTests/resources/runner.js
@@ -170,6 +170,11 @@ if (window.testRunner) {
if (test.doNotIgnoreInitialRun)
completedIterations++;
+ if (!scheduler) {
+ runner();
+ return;
+ }
+
if (runner && test.tracingCategories && window.testRunner &&
window.testRunner.supportTracing) {
window.testRunner.traceEventsToMeasure = test.traceEventsToMeasure;
@@ -267,7 +272,7 @@ if (window.testRunner) {
PerfTestRunner.prepareToMeasureValuesAsync = function (test) {
PerfTestRunner.unit = test.unit;
- start(test);
+ start(test, undefined, test.run);
Xianzhu 2017/05/03 17:14:25 How about: start(test, function(task) { task();
nednguyen 2017/05/03 18:21:52 I tried this first, but doing so lead to invalid t
Xianzhu 2017/05/03 19:16:00 I see the problem. scheduleNextRun() doesn't suppo
nednguyen 2017/05/03 19:18:50 Acknowledged.
}
PerfTestRunner.measureValueAsync = function (measuredValue) {
« no previous file with comments | « third_party/WebKit/PerformanceTests/Parser/html-parser-threaded.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698