| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
| 3 <title>Test combinations of delay and endDelay</title> | 3 <title>Test combinations of delay and endDelay</title> |
| 4 <link rel="help" href="https://w3c.github.io/web-animations/#the-animationeffect
timing-interface"> | 4 <link rel="help" href="https://w3c.github.io/web-animations/#the-animationeffect
timing-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 <body></body> | 8 <body></body> |
| 9 <script> | 9 <script> |
| 10 function testTiming({timing, expectations}, description) { | 10 function testTiming({timing, expectations}, description) { |
| 11 test(t => { | 11 test(t => { |
| 12 for (let {at, expect} of expectations) { | 12 for (let {at, expect} of expectations) { |
| 13 let target = createDiv(t); | 13 let target = createDiv(t); |
| 14 let animation = target.animate({opacity: [0, 1]}, timing); | 14 let animation = target.animate({opacity: [0, 1]}, timing); |
| 15 animation.currentTime = at; | 15 animation.currentTime = at; |
| 16 assert_times_equal(Number(getComputedStyle(target).opacity), expect, 'at '
+ at); | 16 assert_times_equal(Number(getComputedStyle(target).opacity), expect, 'at '
+ at); |
| 17 animation.cancel(); | 17 animation.cancel(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 { at: -2, expect: 0 }, | 101 { at: -2, expect: 0 }, |
| 102 { at: -1, expect: 0 }, | 102 { at: -1, expect: 0 }, |
| 103 { at: 0, expect: 0 }, | 103 { at: 0, expect: 0 }, |
| 104 { at: 5, expect: 0 }, | 104 { at: 5, expect: 0 }, |
| 105 { at: 10, expect: 0 }, | 105 { at: 10, expect: 0 }, |
| 106 { at: 11, expect: 0 }, | 106 { at: 11, expect: 0 }, |
| 107 { at: 12, expect: 0 }, | 107 { at: 12, expect: 0 }, |
| 108 ], | 108 ], |
| 109 }, 'Negative endDelay that eclipses delay and duration'); | 109 }, 'Negative endDelay that eclipses delay and duration'); |
| 110 </script> | 110 </script> |
| OLD | NEW |