OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
3 <title>Animation.startTime tests</title> | 3 <title>Animation.startTime tests</title> |
4 <link rel="help" | 4 <link rel="help" |
5 href="https://w3c.github.io/web-animations/#dom-animation-starttime"> | 5 href="https://w3c.github.io/web-animations/#dom-animation-starttime"> |
6 <script src="/resources/testharness.js"></script> | 6 <script src="/resources/testharness.js"></script> |
7 <script src="/resources/testharnessreport.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
8 <script src="../../testcommon.js"></script> | 8 <script src="../../testcommon.js"></script> |
9 <link rel="stylesheet" href="/resources/testharness.css"> | |
10 <body> | 9 <body> |
11 <div id="log"></div> | 10 <div id="log"></div> |
12 <script> | 11 <script> |
13 'use strict'; | 12 'use strict'; |
14 | 13 |
15 test(function(t) { | 14 test(function(t) { |
16 var animation = new Animation(new KeyframeEffect(createDiv(t), null), | 15 var animation = new Animation(new KeyframeEffect(createDiv(t), null), |
17 document.timeline); | 16 document.timeline); |
18 assert_equals(animation.startTime, null, 'startTime is unresolved'); | 17 assert_equals(animation.startTime, null, 'startTime is unresolved'); |
19 }, 'startTime of a newly created (idle) animation is unresolved'); | 18 }, 'startTime of a newly created (idle) animation is unresolved'); |
(...skipping 20 matching lines...) Expand all Loading... |
40 | 39 |
41 promise_test(function(t) { | 40 promise_test(function(t) { |
42 var animation = createDiv(t).animate(null, 100 * MS_PER_SEC); | 41 var animation = createDiv(t).animate(null, 100 * MS_PER_SEC); |
43 return animation.ready.then(function() { | 42 return animation.ready.then(function() { |
44 assert_greater_than(animation.startTime, 0, 'startTime when running'); | 43 assert_greater_than(animation.startTime, 0, 'startTime when running'); |
45 }); | 44 }); |
46 }, 'startTime is resolved when running'); | 45 }, 'startTime is resolved when running'); |
47 | 46 |
48 </script> | 47 </script> |
49 </body> | 48 </body> |
OLD | NEW |