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> |