| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <style> | 2 <style> |
| 3 .animated { | 3 .animated { |
| 4 -webkit-animation: test 10ms; | 4 animation: test 10ms; |
| 5 -webkit-animation-delay: -10ms; | 5 animation-delay: -10ms; |
| 6 } | 6 } |
| 7 @-webkit-keyframes test { | 7 @keyframes test { |
| 8 0% {} | 8 0% {} |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| 11 <div id="test">FAIL</div> | 11 <div id="test">FAIL</div> |
| 12 <script> | 12 <script> |
| 13 if (window.testRunner) { | 13 if (window.testRunner) { |
| 14 testRunner.dumpAsText(); | 14 testRunner.dumpAsText(); |
| 15 testRunner.waitUntilDone(); | 15 testRunner.waitUntilDone(); |
| 16 } | 16 } |
| 17 onload = function() { | 17 onload = function() { |
| 18 // This test covers a specific regression where an on-demand timing update | 18 // This test covers a specific regression where an on-demand timing update |
| 19 // that was triggered after an animation received a start time could cause | 19 // that was triggered after an animation received a start time could cause |
| 20 // CSS Animation and Transition events to not be fired on the subseuquent | 20 // CSS Animation and Transition events to not be fired on the subseuquent |
| 21 // animation-frame timing update. | 21 // animation-frame timing update. |
| 22 test.classList.add('animated'); | 22 test.classList.add('animated'); |
| 23 test.addEventListener('webkitAnimationStart', function() { | 23 test.addEventListener('animationstart', function() { |
| 24 document.documentElement.textContent = 'PASS'; | 24 document.documentElement.textContent = 'PASS'; |
| 25 if (window.testRunner) | 25 if (window.testRunner) |
| 26 testRunner.notifyDone(); | 26 testRunner.notifyDone(); |
| 27 }); | 27 }); |
| 28 requestAnimationFrame(function() { | 28 requestAnimationFrame(function() { |
| 29 setTimeout(function() { | 29 setTimeout(function() { |
| 30 getComputedStyle(test).left; | 30 getComputedStyle(test).left; |
| 31 }); | 31 }); |
| 32 }); | 32 }); |
| 33 } | 33 } |
| 34 </script> | 34 </script> |
| OLD | NEW |