Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: LayoutTests/compositing/overflow/scrolling-without-painting.html

Issue 408843004: Convert more tests into text-based-repaint tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698