Index: LayoutTests/compositing/overflow/scrolling-without-painting.html |
diff --git a/LayoutTests/compositing/overflow/scrolling-without-painting.html b/LayoutTests/compositing/overflow/scrolling-without-painting.html |
index 036a83e7b35b92fb402c3e40347844219298d1e5..7f6f20da2e33dbef50c71d002d07dbec7f5b7eec 100644 |
--- a/LayoutTests/compositing/overflow/scrolling-without-painting.html |
+++ b/LayoutTests/compositing/overflow/scrolling-without-painting.html |
@@ -21,37 +21,23 @@ repainting their contents. See https://bugs.webkit.org/show_bug.cgi?id=96087. |
margin-top: 25px; |
} |
</style> |
+ <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
<script type="text/javascript"> |
if (window.internals) |
window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true); |
- window.addEventListener('load', function() { |
- if (!window.testRunner || !window.internals) { |
- alert('This test requires testRunner to run!'); |
- return; |
- } |
- testRunner.dumpAsText(); |
- |
- // First paint the entire view including the scrolling element. |
- var scroller = document.getElementById('scroller'); |
- scroller.offsetTop; |
- |
+ function repaintTest() { |
// Scroll down. This should not cause any more repaints to the |
// scrolling contents. |
- window.internals.startTrackingRepaints(document); |
- scroller.scrollTop = 25; |
+ document.getElementById('scroller').scrollTop = 25; |
+ } |
- var layerTree = document.getElementById('layerTree'); |
- layerTree.innerText = |
- window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
- window.internals.stopTrackingRepaints(document); |
- }); |
+ runRepaintTest(); |
</script> |
</head> |
<body> |
<div id="scroller"> |
<div id="content"></div> |
</div> |
- <pre id="layerTree">This text will be replaced with the layer tree.</pre> |
</body> |
</html> |