OLD | NEW |
1 <!doctype HTML> | 1 <!doctype HTML> |
2 Any errors will show below this line. | 2 Any errors will show below this line. |
3 <div id="target" style="position: absolute; width: 200px; height: 200px; will-ch
ange: transform; transition: transform 0.1s cubic-bezier(0.23, 1, 0.32, 1); back
ground: lightblue"></div> | 3 <style> |
| 4 @keyframes twiddle { |
| 5 0% { transform: rotate(0deg); } |
| 6 100% { transform: rotate(180deg); } |
| 7 } |
| 8 |
| 9 .animated { |
| 10 animation: twiddle 3s alternate infinite linear; |
| 11 width: 100px; |
| 12 height: 100px; |
| 13 background: orange; |
| 14 } |
| 15 </style> |
| 16 <div id="target" class="animated" style="position: absolute; width: 200px; heigh
t: 200px; background: lightblue"></div> |
4 <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> |
5 <script src="../../resources/testharness.js"></script> | 18 <script src="../../resources/testharness.js"></script> |
6 <script> | 19 <script> |
7 if (window.testRunner) { | 20 if (window.testRunner) { |
8 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
9 testRunner.waitUntilDone(); | |
10 } | 22 } |
11 onload = function() { | 23 onload = function() { |
12 target.style.transform = "translateX(10px)"; | 24 target.style.transform = "translateX(10px)"; |
13 requestAnimationFrame(function() { | 25 if (window.internals) { |
14 if (window.internals) { | 26 var layers = JSON.parse(internals.layerTreeAsText(document, 1)); |
15 var layers = JSON.parse(internals.layerTreeAsText(document, 1)); | 27 assert_true(layers.children[0].children[1].compositingReasons[1] == "Lay
er was separately composited because it could not be squashed."); |
16 assert_true(layers.children[0].children[1].compositingReasons[1] ==
"Cannot squash into a layer that is animating."); | 28 assert_true(layers.children[0].children[1].squashingDisallowedReasons[0]
== "Cannot squash into a layer that is animating."); |
17 } | 29 } |
18 testRunner.notifyDone(); | |
19 }); | |
20 }; | 30 }; |
21 </script> | 31 </script> |
OLD | NEW |