OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> |
| 3 <title>Animating with KeyframeEffectReadOnly objects</title> |
| 4 <script src="../../../resources/testharness.js"></script> |
| 5 <script src="../../../resources/testharnessreport.js"></script> |
| 6 <body> |
| 7 <div id="target"></div> |
| 8 <div id="targetRO"></div> |
| 9 <script> |
| 10 "use strict"; |
| 11 |
| 12 promise_test(function(t) { |
| 13 var effect = new KeyframeEffect(target, { opacity: [0, 0.9] }, 1000); |
| 14 var anim = target.animate(null); |
| 15 anim.effect = effect; |
| 16 |
| 17 var effectRO = new KeyframeEffectReadOnly( |
| 18 targetRO, { opacity: [0, 0.9] }, 1000); |
| 19 var animRO = targetRO.animate(null); |
| 20 animRO.effect = effectRO; |
| 21 |
| 22 return Promise.all([anim.ready, animRO.ready]).then(function() { |
| 23 assert_true(internals.isCompositedAnimation(anim), |
| 24 "Opacity animation with KeyframeEffect should be composited"); |
| 25 assert_true(internals.isCompositedAnimation(animRO), |
| 26 "Opacity animation with KeyframeEffectReadOnly should be" |
| 27 + " composited"); |
| 28 }); |
| 29 }, "Using KeyframeEffect or KeyframeEffectReadOnly should not change whether an" |
| 30 + " animation is composited"); |
| 31 |
| 32 </script> |
| 33 </body> |
OLD | NEW |