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

Unified Diff: third_party/WebKit/PerformanceTests/Dromaeo/resources/dromaeorunner.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/Dromaeo/resources/dromaeorunner.js
diff --git a/third_party/WebKit/PerformanceTests/Dromaeo/resources/dromaeorunner.js b/third_party/WebKit/PerformanceTests/Dromaeo/resources/dromaeorunner.js
index 898e4e845aef1748ec7c40d01afb5d8fe00ade17..c77517f93f45f0606b9d5db72664a374f7f5a698 100644
--- a/third_party/WebKit/PerformanceTests/Dromaeo/resources/dromaeorunner.js
+++ b/third_party/WebKit/PerformanceTests/Dromaeo/resources/dromaeorunner.js
@@ -4,38 +4,39 @@
setup: function(testName) {
var ITERATION_COUNT = 5;
- PerfTestRunner.prepareToMeasureValuesAsync({
+ PerfTestRunner.startMeasureValuesAsync({
iterationCount: ITERATION_COUNT,
doNotMeasureMemoryUsage: true,
doNotIgnoreInitialRun: true,
- unit: 'runs/s'
- });
-
- var iframe = document.createElement("iframe");
- var url = DRT.baseURL + "?" + testName + '&numTests=' + ITERATION_COUNT;
- iframe.setAttribute("src", url);
- document.body.insertBefore(iframe, document.body.firstChild);
- iframe.addEventListener(
- "load", function() {
- DRT.targetDocument = iframe.contentDocument;
- DRT.targetWindow = iframe.contentDocument.defaultView;
- });
+ unit: 'runs/s',
+ run: function() {
+ var iframe = document.createElement("iframe");
+ var url = DRT.baseURL + "?" + testName + '&numTests=' + ITERATION_COUNT;
+ iframe.setAttribute("src", url);
+ document.body.insertBefore(iframe, document.body.firstChild);
+ iframe.addEventListener(
+ "load", function() {
+ DRT.targetDocument = iframe.contentDocument;
+ DRT.targetWindow = iframe.contentDocument.defaultView;
+ });
- window.addEventListener(
- "message",
- function(event) {
- switch(event.data.name) {
- case "dromaeo:ready":
- DRT.start();
- break;
- case "dromaeo:progress":
- DRT.progress(event.data);
- break;
- case "dromaeo:alldone":
- DRT.teardown(event.data);
- break;
- }
- });
+ window.addEventListener(
+ "message",
+ function(event) {
+ switch(event.data.name) {
+ case "dromaeo:ready":
+ DRT.start();
+ break;
+ case "dromaeo:progress":
+ DRT.progress(event.data);
+ break;
+ case "dromaeo:alldone":
+ DRT.teardown(event.data);
+ break;
+ }
+ });
+ }
+ });
},
start: function() {

Powered by Google App Engine
This is Rietveld 408576698