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

Side by Side Diff: third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-into-animated-layers.html

Issue 2397333002: Change layerTreeAsText to default to layer lists. (Closed)
Patch Set: none Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 <!doctype HTML> 1 <!doctype HTML>
2 Any errors will show below this line. 2 Any errors will show below this line.
3 <style> 3 <style>
4 @keyframes twiddle { 4 @keyframes twiddle {
5 0% { transform: rotate(0deg); } 5 0% { transform: rotate(0deg); }
6 100% { transform: rotate(180deg); } 6 100% { transform: rotate(180deg); }
7 } 7 }
8 8
9 .animated { 9 .animated {
10 animation: twiddle 3s alternate infinite linear; 10 animation: twiddle 3s alternate infinite linear;
11 width: 100px; 11 width: 100px;
12 height: 100px; 12 height: 100px;
13 background: orange; 13 background: orange;
14 } 14 }
15 </style> 15 </style>
16 <div id="target" class="animated" style="position: absolute; width: 200px; heigh t: 200px; background: lightblue"></div> 16 <div id="target" class="animated" style="position: absolute; width: 200px; heigh t: 200px; background: lightblue"></div>
17 <div style="position: absolute; width: 200px; height: 200px; top: 100px; left: 1 00px; background: lightgray"></div> 17 <div style="position: absolute; width: 200px; height: 200px; top: 100px; left: 1 00px; background: lightgray"></div>
18 <script src="../../resources/testharness.js"></script> 18 <script src="../../resources/testharness.js"></script>
19 <script> 19 <script>
20 if (window.testRunner) { 20 if (window.testRunner) {
21 testRunner.dumpAsText(); 21 testRunner.dumpAsText();
22 } 22 }
23 onload = function() { 23 onload = function() {
24 target.style.transform = "translateX(10px)"; 24 target.style.transform = "translateX(10px)";
25 if (window.internals) { 25 if (window.internals) {
26 var layers = JSON.parse(internals.layerTreeAsText(document, 1)); 26 var layers = JSON.parse(internals.layerTreeAsText(document, 1))["layers" ]
27 assert_true(layers.children[0].children[1].compositingReasons[1] == "Lay er was separately composited because it could not be squashed."); 27 assert_true(layers[2].compositingReasons[1] == "Layer was separately com posited because it could not be squashed.");
28 assert_true(layers.children[0].children[1].squashingDisallowedReasons[0] == "Cannot squash into a layer that is animating."); 28 assert_true(layers[2].squashingDisallowedReasons[0] == "Cannot squash in to a layer that is animating.");
29 } 29 }
30 }; 30 };
31 </script> 31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698