| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>Test Animation.ready attribute</title> | 3 <title>Test Animation.ready attribute</title> |
| 4 <link rel="https://w3c.github.io/web-animations/#the-animation-interface"> | 4 <link rel="https://w3c.github.io/web-animations/#the-animation-interface"> |
| 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 | 8 |
| 9 <script> | 9 <script> |
| 10 test(function() { | 10 test(function() { |
| 11 var animation = document.documentElement.animate([], 100000); | 11 var animation = document.documentElement.animate([], 100000); |
| 12 assert_true(animation.ready instanceof Promise); | 12 assert_true(animation.ready instanceof Promise); |
| 13 }, 'The ready attribute should be a Promise'); | 13 }, 'The ready attribute should be a Promise'); |
| 14 | 14 |
| 15 async_test(function(t) { | 15 async_test(function(t) { |
| 16 var animation = document.documentElement.animate([], 100000); | 16 var animation = document.documentElement.animate([], 100000); |
| 17 animation.cancel(); | 17 animation.cancel(); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 animation.pause(); | 84 animation.pause(); |
| 85 promise.then(function(p) { | 85 promise.then(function(p) { |
| 86 t.step(function() { | 86 t.step(function() { |
| 87 assert_equals(p, animation); | 87 assert_equals(p, animation); |
| 88 assert_equals(animation.ready, promise); | 88 assert_equals(animation.ready, promise); |
| 89 }); | 89 }); |
| 90 t.done(); | 90 t.done(); |
| 91 }); | 91 }); |
| 92 }, 'A pending ready promise should be resolved and not replaced when the animati
on enters the paused state'); | 92 }, 'A pending ready promise should be resolved and not replaced when the animati
on enters the paused state'); |
| 93 </script> | 93 </script> |
| OLD | NEW |