Add a waitUntilReady() step
https://bugs.webkit.org/show_bug.cgi?id=152862

Reviewed by Simon Fraser.

Add a waitUntilReady() callback that lets the benchmark complete
its setup before running the benchmark.

* Animometer/tests/resources/main.js:
(Benchmark.prototype.run): First call waitUntilReady, which returns
a promise. When the promise resolves, run everything that was in this
function.
(Benchmark.prototype.waitUntilReady): Default implementation returns
a resolved promise.
(Benchmark.prototype.resolveWhenFinished): Deleted.
* Animometer/tests/template/resources/template-canvas.js:
(new.TemplateCanvasStage.waitUntilReady): Example on how to override.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@194743 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4 files changed