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

Unified Diff: LayoutTests/compositing/repaint/invalidations-on-composited-layers.html

Issue 408843004: Convert more tests into text-based-repaint tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove LayoutTests/virtual/softwarecompositing/repaint/invalidations-on-composited-layers-expected.… 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/repaint/invalidations-on-composited-layers.html
diff --git a/LayoutTests/compositing/repaint/invalidations-on-composited-layers.html b/LayoutTests/compositing/repaint/invalidations-on-composited-layers.html
index 3d37e18b0325226ddc71431987bcfba2e86fb5b6..1d7c4b5a91d43a3ae4d59746eb3fa88b593ca163 100644
--- a/LayoutTests/compositing/repaint/invalidations-on-composited-layers.html
+++ b/LayoutTests/compositing/repaint/invalidations-on-composited-layers.html
@@ -25,48 +25,20 @@ This test checks that repaint testing works with composited layers.
}
</style>
- <script type="text/javascript">
- window.addEventListener('load', function() {
- if (!window.testRunner) {
- alert('This test requires testRunner to run!');
- return;
- }
-
- if (!window.internals) {
- alert('This test requires window.interals to run!');
- return;
- }
-
- testRunner.dumpAsText();
-
+ <script src="../../fast/repaint/resources/text-based-repaint.js"></script>
+ <script>
+ function repaintTest() {
var parent = document.getElementById('parent');
var child = document.getElementById('child');
- // Ensure that we've recalculated style before starting repaint
- // tracking (we don't want our lists of invalidated rects to be
- // polluted).
- document.body.offsetTop;
- window.internals.startTrackingRepaints(document);
-
child.style.background = 'blue';
parent.style.background = 'green';
+ }
- var text = document.getElementById('text');
- text.innerHTML = 'This text will be replaced with the layer tree';
-
- // Force a style recalc.
- document.body.offsetTop;
-
- var layerTreeText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
-
- window.internals.stopTrackingRepaints(document);
-
- text.innerHTML = layerTreeText;
- });
+ runRepaintTest();
</script>
</head>
<body>
- <pre id="text"></pre>
<div id="parent">
<div id="child"></div>
</div>

Powered by Google App Engine
This is Rietveld 408576698