| 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" href="https://w3c.github.io/web-animations/#dom-animation-start
time"> | 4 <link rel="help" href="https://w3c.github.io/web-animations/#dom-animation-start
time"> |
| 5 <script src="../resources/testharness.js"></script> | 5 <script src="../resources/testharness.js"></script> |
| 6 <script src="../resources/testharnessreport.js"></script> | 6 <script src="../resources/testharnessreport.js"></script> |
| 7 <script src="../imported/wpt/web-animations/testcommon.js"></script> | 7 <script src="../external/wpt/web-animations/testcommon.js"></script> |
| 8 <link rel="stylesheet" href="../resources/testharness.css"> | 8 <link rel="stylesheet" href="../resources/testharness.css"> |
| 9 <body> | 9 <body> |
| 10 <div>This test is a copy of LayoutTests/imported/wpt/web-animations/interfaces/A
nimation/startTime.html. Make sure to upstream this to the w3c test suite as it
contains an added test that would fit well there.</div> | 10 <div>This test is a copy of LayoutTests/external/wpt/web-animations/interfaces/A
nimation/startTime.html. Make sure to upstream this to the w3c test suite as it
contains an added test that would fit well there.</div> |
| 11 <div id="log"></div> | 11 <div id="log"></div> |
| 12 <script> | 12 <script> |
| 13 'use strict'; | 13 'use strict'; |
| 14 | 14 |
| 15 test(function(t) { | 15 test(function(t) { |
| 16 var animation = new Animation(new KeyframeEffect(createDiv(t), null), | 16 var animation = new Animation(new KeyframeEffect(createDiv(t), null), |
| 17 document.timeline); | 17 document.timeline); |
| 18 assert_equals(animation.startTime, null, 'startTime is unresolved'); | 18 assert_equals(animation.startTime, null, 'startTime is unresolved'); |
| 19 }, 'startTime of a newly created (idle) animation is unresolved'); | 19 }, 'startTime of a newly created (idle) animation is unresolved'); |
| 20 | 20 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 47 | 47 |
| 48 test(function() { | 48 test(function() { |
| 49 var player = document.documentElement.animate([], 100000); | 49 var player = document.documentElement.animate([], 100000); |
| 50 player.cancel(); | 50 player.cancel(); |
| 51 assert_equals(player.startTime, null); | 51 assert_equals(player.startTime, null); |
| 52 assert_equals(player.currentTime, null); | 52 assert_equals(player.currentTime, null); |
| 53 }, "startTime and currentTime are unresolved when animation is cancelled"); | 53 }, "startTime and currentTime are unresolved when animation is cancelled"); |
| 54 | 54 |
| 55 </script> | 55 </script> |
| 56 </body> | 56 </body> |
| OLD | NEW |