Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / squashing / invalidations-with-large-negative-margin.html
index 3ab605b..83ad4a8 100644 (file)
@@ -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>
\ No newline at end of file