OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <div id='element'></div> |
| 5 <style> |
| 6 #element { |
| 7 transition: background 100ms; |
| 8 background: black; |
| 9 } |
| 10 </style> |
| 11 <script> |
| 12 var t = async_test('Replaying a transition after it has finished should not trig
ger a new transition'); |
| 13 |
| 14 t.step(function() { |
| 15 element.offsetTop; // Force recalc |
| 16 element.style.background = "green"; |
| 17 element.offsetTop; // Force recalc |
| 18 |
| 19 assert_equals(document.timeline.getAnimationPlayers().length, 1); |
| 20 var player = document.timeline.getAnimationPlayers()[0]; |
| 21 player.onfinish = function() { |
| 22 requestAnimationFrame(function() { |
| 23 requestAnimationFrame(function() { |
| 24 player.startTime = document.timeline.currentTime - 10; |
| 25 player.onfinish = t.done.bind(t); |
| 26 }); |
| 27 }); |
| 28 } |
| 29 }); |
| 30 </script> |
OLD | NEW |