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

Unified Diff: LayoutTests/compositing/squashing/resize-squashing-layer-that-needs-full-repaint.html

Issue 403843002: Convert some layout tests to text-based-repaint tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase tests (due to removal of <pre>) 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/squashing/resize-squashing-layer-that-needs-full-repaint.html
diff --git a/LayoutTests/compositing/squashing/resize-squashing-layer-that-needs-full-repaint.html b/LayoutTests/compositing/squashing/resize-squashing-layer-that-needs-full-repaint.html
index b44b41cf1179e0a8a69df411f29cd08380b7575a..58ee595919f8a7c050cdd24c0a142a99ad979ee2 100644
--- a/LayoutTests/compositing/squashing/resize-squashing-layer-that-needs-full-repaint.html
+++ b/LayoutTests/compositing/squashing/resize-squashing-layer-that-needs-full-repaint.html
@@ -1,37 +1,20 @@
<!doctype html>
-<script src="../../resources/run-after-display.js"></script>
+<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
<!-- The second two divs form a combined squashing layer. display:none'ing the first of them will resize the squashing layer. -->
<div style="width: 500px; height: 500px; -webkit-transform: translateZ(0)"></div>
<div style="position: absolute; top: 55px; left: 55px; width: 500px; height: 500px; background-color: lightblue"></div>
<div id="to-be-removed" style="position: absolute; top: 0px; left: 0px; width: 50px; height: 50px; background-color: lightgray"></div>
-<pre id="output" style="display: none"></pre>
<script>
// This test checks that resizing a squashing layer such that the offset of content squashed into it relative to the squashing
// container causes a repaint of its bounds within the updated squashing layer geometry.
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
if (window.internals)
internals.settings.setLayerSquashingEnabled(true);
-runAfterDisplay(function() {
- if (window.internals)
- window.internals.startTrackingRepaints(document);
+function repaintTest() {
document.querySelector("#to-be-removed").style.display = 'none';
+}
- var output = document.querySelector("#output");
- if (window.internals) {
- output.textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
- window.internals.stopTrackingRepaints(document);
- }
- output.style.display = 'block';
-
- if (window.testRunner)
- testRunner.notifyDone();
-
-});
+runRepaintTest();
</script>

Powered by Google App Engine
This is Rietveld 408576698