Index: LayoutTests/fast/canvas/webgl/canvas-test.html |
diff --git a/LayoutTests/fast/canvas/webgl/canvas-test.html b/LayoutTests/fast/canvas/webgl/canvas-test.html |
index 99ec31b5b7d6328597902c18df0ce3cc1b42acc0..9e5ca863e2a52ebe34d4e85e0de2aff9069ebaae 100644 |
--- a/LayoutTests/fast/canvas/webgl/canvas-test.html |
+++ b/LayoutTests/fast/canvas/webgl/canvas-test.html |
@@ -7,6 +7,7 @@ |
<script src="resources/desktop-gl-constants.js" type="text/javascript"></script> |
<script src="../../../resources/js-test.js"></script> |
<script src="resources/webgl-test.js"></script> |
+<script src="../../../resources/run-after-display.js"></script> |
</head> |
<body> |
<div id="description"></div> |
@@ -133,13 +134,9 @@ if (!gl) { |
debug("change display size of canvas and see that viewport does not change"); |
canvas.style.width = "100px"; |
canvas.style.height = "25px"; |
- var intervalId; |
- intervalId = window.setInterval(function() { |
- if (window.testRunner) |
- testRunner.display(); |
+ runAfterDisplay(function() { |
if (canvas.clientWidth == 100 && |
canvas.clientHeight == 25) { |
- window.clearInterval(intervalId); |
shouldBe('getViewport()', '"0,0,300,150"'); |
shouldBe('canvas.width', '300'); |
shouldBe('canvas.height', '150'); |
@@ -176,7 +173,7 @@ if (!gl) { |
finishJSTest(); |
} |
- }, 1000/30); |
+ }); |
} |
</script> |