Index: LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html |
diff --git a/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html b/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html |
index 3ab605bc430f03ec70d7860335f2fdbe09a10792..83ad4a87f6812ba336731b14b0dc69bfdefc9c70 100644 |
--- a/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html |
+++ b/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html |
@@ -7,39 +7,18 @@ |
</div> |
</div> |
-<pre id="output" style="display:none"></pre> |
+<script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
<script> |
// Test that moving a RenderLayer that is squashed relative to its squashing container repaints correctly. |
// In particular, the repaint rect needs to be recorded in the correct position relative to the squashing GraphicsLayer. |
-if (window.testRunner) { |
- testRunner.dumpAsText(); |
- testRunner.waitUntilDone(); |
-} |
-if (window.internals) { |
+if (window.internals) |
window.internals.settings.setLayerSquashingEnabled(true); |
- window.internals.startTrackingRepaints(document); |
-} |
-var updateFunction = function() |
+ |
+function repaintTest() |
{ |
document.getElementById('chip').style.left = "400px"; |
- |
- if (window.internals) { |
- var data = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
- window.internals.stopTrackingRepaints(document); |
- var output = document.getElementById('output'); |
- output.textContent = data; |
- |
- output.style.display = "block"; |
- } |
- if (window.testRunner) |
- testRunner.notifyDone(); |
} |
-// Wait two frames before updating the chip's style, so that the document is painted and squashed first. |
-window.requestAnimationFrame(function() { |
- window.requestAnimationFrame(updateFunction); |
-}); |
- |
- |
+runRepaintTest(); |
</script> |