Index: tools/perf/page_sets/tough_animation_cases/resources/perftesthelper.js |
diff --git a/tools/perf/page_sets/tough_animation_cases/resources/perftesthelper.js b/tools/perf/page_sets/tough_animation_cases/resources/perftesthelper.js |
index de5c254c63547a9be125efad629c64dff398f35e..6f1ab10110211c96aea340cfefb748e71314a0de 100644 |
--- a/tools/perf/page_sets/tough_animation_cases/resources/perftesthelper.js |
+++ b/tools/perf/page_sets/tough_animation_cases/resources/perftesthelper.js |
@@ -23,4 +23,26 @@ window.PerfTestHelper.random = function() { |
return (randomSeed & 0xfffffff) / 0x10000000; |
}; |
+window.PerfTestHelper.getN = function(defaultN) { |
+ var match = /N=(\d+)/.exec(window.location.search); |
+ if (match) { |
+ return Number(match[1]); |
+ } |
+ if (typeof defaultN === 'undefined') { |
+ throw 'Default N value required'; |
+ } |
+ return defaultN; |
+}; |
+ |
+window.PerfTestHelper.signalReady = function() { |
+ requestAnimationFrame(function() { |
+ // FIXME: We must wait at least two frames before |
+ // measuring to allow the GC to clean up the |
+ // previous test. |
+ requestAnimationFrame(function() { |
+ window.measurementReady = true; |
+ }); |
+ }); |
+}; |
+ |
})(); |