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

Unified Diff: LayoutTests/fast/canvas/canvas-resize-after-paint.html

Issue 183703003: Remove more testRunner.display() calls from LayoutTests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Ditch fast/text/font-initial changes too Created 6 years, 10 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/canvas-resize-after-paint.html
diff --git a/LayoutTests/fast/canvas/canvas-resize-after-paint.html b/LayoutTests/fast/canvas/canvas-resize-after-paint.html
index 9e960bf80a9eb79688e171bcacf3b097cf14a788..0054770abb95a5be150f0b875ae59c8a34cc9815 100644
--- a/LayoutTests/fast/canvas/canvas-resize-after-paint.html
+++ b/LayoutTests/fast/canvas/canvas-resize-after-paint.html
@@ -1,22 +1,23 @@
<!DOCTYPE html>
+<script src="../../resources/run-after-display.js"></script>
<canvas id="c" width=100 height=100></canvas>
<!-- Tests that resizing a canvas to very large dimensions after a composite does not crash -->
<script>
-if (window.testRunner)
+if (window.testRunner) {
testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
var c = document.getElementById("c");
function resize() {
c.width = "5000";
c.height = "10000";
+ document.write("PASS");
+ if (window.testRunner)
+ testRunner.notifyDone();
}
-if (window.testRunner) {
- testRunner.display(); // Force a composite at normal width/height to ensure we have a compositing layer for the canvas.
- resize();
-} else
- window.setTimeout(resize, 0);
-
-document.write("PASS");
+// Force a composite at normal width/height to ensure we have a compositing layer for the canvas.
+runAfterDisplay(resize);
</script>

Powered by Google App Engine
This is Rietveld 408576698