| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Things</title> | 2 <title>Things</title> |
| 3 <link rel="https://w3c.github.io/web-animations/#the-computedtimingproperties-di
ctionary"> | 3 <link rel="https://w3c.github.io/web-animations/#the-computedtimingproperties-di
ctionary"> |
| 4 <script src="../resources/testharness.js"></script> | 4 <script src="../resources/testharness.js"></script> |
| 5 <script src="../resources/testharnessreport.js"></script> | 5 <script src="../resources/testharnessreport.js"></script> |
| 6 <script src="../imported/wpt/web-animations/testcommon.js"></script> | 6 <script src="../imported/wpt/web-animations/testcommon.js"></script> |
| 7 | 7 |
| 8 <body> | 8 <body> |
| 9 <div id='e'></div> | 9 <div id='e'></div> |
| 10 </body> | 10 </body> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 assert_times_equal(keyframeEffect.getComputedTiming().activeDuration, 12); | 59 assert_times_equal(keyframeEffect.getComputedTiming().activeDuration, 12); |
| 60 }, 'ComputedTimingProperties startTime, endTime, duration, activeDuration are se
nsible for keyframeEffects with delays and iterations'); | 60 }, 'ComputedTimingProperties startTime, endTime, duration, activeDuration are se
nsible for keyframeEffects with delays and iterations'); |
| 61 | 61 |
| 62 test(function() { | 62 test(function() { |
| 63 var keyframeEffect = new KeyframeEffect(element, keyframes, {delay: 1}); | 63 var keyframeEffect = new KeyframeEffect(element, keyframes, {delay: 1}); |
| 64 assert_times_equal(keyframeEffect.getComputedTiming().duration, 0); | 64 assert_times_equal(keyframeEffect.getComputedTiming().duration, 0); |
| 65 }, 'ComputedTimingProperties duration is calculated when no duration is specifie
d'); | 65 }, 'ComputedTimingProperties duration is calculated when no duration is specifie
d'); |
| 66 | 66 |
| 67 test(function() { | 67 test(function() { |
| 68 var timing = new KeyframeEffect(element, keyframes).timing; | 68 var timing = new KeyframeEffect(element, keyframes).timing; |
| 69 for (var attr of ['delay', 'endDelay', 'iterationStart', 'playbackRate']) { | 69 for (var attr of ['delay', 'endDelay', 'iterationStart']) { |
| 70 assert_throws(new TypeError, function() { timing[attr] = NaN; }, attr); | 70 assert_throws(new TypeError, function() { timing[attr] = NaN; }, attr); |
| 71 assert_throws(new TypeError, function() { timing[attr] = Infinity; }, attr); | 71 assert_throws(new TypeError, function() { timing[attr] = Infinity; }, attr); |
| 72 } | 72 } |
| 73 }, 'Restricted double attributes on the AnimationEffectTiming interface throws f
or non-finite values.'); | 73 }, 'Restricted double attributes on the AnimationEffectTiming interface throws f
or non-finite values.'); |
| 74 | 74 |
| 75 </script> | 75 </script> |
| OLD | NEW |