OLD | NEW |
1 <style> | 1 <style> |
2 #target { | 2 #target { |
3 position: absolute; | 3 position: absolute; |
4 width: 10px; | 4 width: 10px; |
5 height: 10px; | 5 height: 10px; |
6 background: black; | 6 background: black; |
7 } | 7 } |
8 </style> | 8 </style> |
9 <script src="../bootstrap.js"></script> | 9 <script src="../bootstrap.js"></script> |
10 <div id="target"></div> | 10 <div id="target"></div> |
11 <script> | 11 <script> |
12 timing_test(function() { | 12 timing_test(function() { |
13 var player = target.animate([{left: '0px'}, {left: '100px'}], {duration: 2,
fill: 'forwards'}); | 13 var player = target.animate([{left: '0px'}, {left: '100px'}], {duration: 2,
fill: 'forwards'}); |
14 | 14 |
15 at(1, function() { | 15 at(1, function() { |
16 assert_styles(target, {left: '50px'}); | 16 assert_styles(target, {left: '50px'}); |
17 player.currentTime = 3; | 17 player.currentTime = 3; |
18 player.playbackRate = -1; | 18 player.playbackRate = -1; |
19 assert_styles(target, {left: '100px'}); | 19 assert_styles(target, {left: '100px'}); |
20 }, 'AnimationPlayer reversing'); | 20 }, 'AnimationPlayer reversing'); |
21 | 21 |
22 at(2, function() {}, 'Tick'); | 22 at(2, function() {}, 'Tick'); |
23 | 23 |
24 at(3, function() { | 24 at(3, function() { |
25 assert_styles(target, {left: '50px'}); | 25 assert_styles(target, {left: '50px'}); |
26 }, 'Reversed player entering its active phase should take effect'); | 26 }, 'Reversed player entering its active phase should take effect'); |
27 }); | 27 }); |
28 </script> | 28 </script> |
OLD | NEW |