OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> |
| 3 <title>AnimationEffect local time tests</title> |
| 4 <link rel="help" href="https://w3c.github.io/web-animations/#local-time"> |
| 5 <script src="/resources/testharness.js"></script> |
| 6 <script src="/resources/testharnessreport.js"></script> |
| 7 <script src="../../testcommon.js"></script> |
| 8 <body> |
| 9 <script> |
| 10 'use strict'; |
| 11 |
| 12 test(function(t) { |
| 13 var anim = createDiv(t).animate(null, 10 * MS_PER_SEC); |
| 14 for (var seconds of [-1, 0, 5, 10, 20]) { |
| 15 anim.currentTime = seconds * MS_PER_SEC; |
| 16 assert_equals(anim.effect.getComputedTiming().localTime, seconds * MS_PER_SE
C); |
| 17 } |
| 18 }, 'Local time is current time for animation effects associated with an animatio
n'); |
| 19 |
| 20 test(function(t) { |
| 21 var effect = new KeyframeEffect(createDiv(t), null, 10 * MS_PER_SEC); |
| 22 assert_equals(effect.getComputedTiming().localTime, null); |
| 23 }, 'Local time is unresolved for animation effects not associated with an animat
ion'); |
| 24 |
| 25 </script> |
| 26 </body> |
OLD | NEW |