Index: LayoutTests/compositing/iframes/repaint-after-losing-scrollbars.html |
diff --git a/LayoutTests/compositing/iframes/repaint-after-losing-scrollbars.html b/LayoutTests/compositing/iframes/repaint-after-losing-scrollbars.html |
index 832178f0fd374b79fe7e29044fa57b732a9aadd7..a3b2f7c75fd2d8ea40f1975fccef719bad4d8edf 100644 |
--- a/LayoutTests/compositing/iframes/repaint-after-losing-scrollbars.html |
+++ b/LayoutTests/compositing/iframes/repaint-after-losing-scrollbars.html |
@@ -1,4 +1,5 @@ |
<!DOCTYPE html> |
+<script src="../../resources/run-after-display.js"></script> |
<!-- Tests that overflow controls are repainted after compositing is disabled. There should be three green squares and no visible overflow controls --> |
<style> |
.composited { |
@@ -26,6 +27,8 @@ function finishTest() { |
document.getElementById("horizontal").contentDocument.body.classList.remove("wide"); // middle iframe loses a horizontal scrollbar |
document.getElementById("both").contentDocument.body.classList.remove("wide"); // bottom iframe loses both |
document.getElementById("both").contentDocument.body.classList.remove("tall"); // bottom iframe loses both |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
} |
function test() { |
@@ -35,9 +38,8 @@ function test() { |
document.getElementById("both").contentDocument.body.classList.add("tall"); // vertical and horizontal scrollbars |
if (window.testRunner) { |
testRunner.dumpAsTextWithPixelResults(); |
- testRunner.display(); // Paint once with all overflow controls visible. |
- finishTest(); |
- } else |
- window.setTimeout(finishTest, 5000); |
+ testRunner.waitUntilDone(); |
+ } |
+ runAfterDisplay(finishTest); |
} |
</script> |