Index: LayoutTests/css3/flexbox/repaint-during-resize-no-flex.html |
diff --git a/LayoutTests/css3/flexbox/repaint-during-resize-no-flex.html b/LayoutTests/css3/flexbox/repaint-during-resize-no-flex.html |
index 6b1cbd960c2756ae0c3d017e551bcecc80defef4..bd501667dfefb80b4648153b8cdc4d6b642562fe 100644 |
--- a/LayoutTests/css3/flexbox/repaint-during-resize-no-flex.html |
+++ b/LayoutTests/css3/flexbox/repaint-during-resize-no-flex.html |
@@ -2,6 +2,8 @@ |
<html> |
<head> |
<link rel="stylesheet" href="resources/flexbox.css"> |
+<script src="../../resources/run-after-display.js"></script> |
+<script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
<style> |
body { |
margin: 0; |
@@ -28,23 +30,26 @@ body { |
<div class="flex-item"></div> |
</div> |
<script> |
-function resizeFlexItem() { |
+function repaintTest() { |
var div = document.getElementById("flex-item-1"); |
div.classList.add("width"); |
- if (window.testRunner) |
- testRunner.notifyDone(); |
+} |
+function resizeFlexItem() { |
+ runRepaintTest(); |
+ finishRepaintTest(); |
}; |
window.onload = function() { |
if (window.testRunner) { |
testRunner.waitUntilDone(); |
- testRunner.display(); |
} else { |
document.body.appendChild(document.createTextNode( |
"Tests to make sure that when changing the size of one flex item changes the " |
+ "location of another flex item, we properly repaint. The repaint rect should " |
+ "include the three flex items.")); |
} |
- setTimeout(resizeFlexItem, 0); |
+ window.enablePixelTesting = true; |
+ window.testIsAsync = true; |
+ runAfterDisplay(resizeFlexItem) |
}; |
</script> |
</body></html> |