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

Unified Diff: LayoutTests/fast/canvas/resources/repaint.js

Issue 196353013: Convert some repaint tests to not call display() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More expectations, remove do-not-repaint tricky test Created 6 years, 9 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: LayoutTests/fast/canvas/resources/repaint.js
diff --git a/LayoutTests/fast/canvas/resources/repaint.js b/LayoutTests/fast/canvas/resources/repaint.js
index e4b713a38496d29f317547368cf074e0abf96907..3a29deeee90d05d955fbbbaaaf2f1fa0c614d22a 100644
--- a/LayoutTests/fast/canvas/resources/repaint.js
+++ b/LayoutTests/fast/canvas/resources/repaint.js
@@ -1,10 +1,13 @@
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
function runRepaintTest()
{
- if (window.testRunner) {
- document.body.offsetTop;
- testRunner.display();
- repaintTest();
- } else {
- setTimeout(repaintTest, 100);
- }
+ window.requestAnimationFrame(function() {
+ window.setTimeout(function() {
+ repaintTest();
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+ });
}

Powered by Google App Engine
This is Rietveld 408576698