| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 div { | 3 div { |
| 4 position: absolute; | 4 position: absolute; |
| 5 width: 100px; | 5 width: 100px; |
| 6 height: 100px; | 6 height: 100px; |
| 7 } | 7 } |
| 8 | 8 |
| 9 #expectation { | 9 #expectation { |
| 10 font-size: 50px; | 10 font-size: 50px; |
| 11 background: red; | 11 background: red; |
| 12 transform: translate(1em, 1em); | 12 transform: translate(1em, 1em); |
| 13 } | 13 } |
| 14 | 14 |
| 15 #target { | 15 #target { |
| 16 font-size: 1px; | 16 font-size: 1px; |
| 17 background: green; | 17 background: green; |
| 18 } | 18 } |
| 19 </style> | 19 </style> |
| 20 <span id="text"></span> |
| 20 <div id="expectation"></div> | 21 <div id="expectation"></div> |
| 21 <div id="target"></div> | 22 <div id="target"></div> |
| 22 <script> | 23 <script> |
| 23 target.style.fontSize = "50px"; | 24 target.style.fontSize = "50px"; |
| 24 target.animate([ | 25 var animation = target.animate([ |
| 25 {transform: "translate(1em, 1em)"}, | 26 {transform: "translate(1em, 1em)"}, |
| 26 {transform: "translate(1em, 1em)"}, | 27 {transform: "translate(1em, 1em)"}, |
| 27 ], { | 28 ], { |
| 28 duration: 1000, | 29 duration: 1e10, |
| 29 iterations: Infinity, | 30 iterations: Infinity, |
| 30 }); | 31 }); |
| 32 |
| 33 testRunner.waitUntilDone(); |
| 34 requestAnimationFrame(function() { |
| 35 requestAnimationFrame(function() { |
| 36 var composited = internals.isCompositedAnimation(animation); |
| 37 text.textContent = `Animation ${composited ? 'is' : 'is not'} running on the
compositor.`; |
| 38 testRunner.notifyDone(); |
| 39 }); |
| 40 }); |
| 31 </script> | 41 </script> |
| OLD | NEW |