| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Tests that unprefixed animation events are correctly fired when using h
tml event listeners.</title> | 4 <title>Tests that unprefixed animation events are correctly fired when using h
tml event listeners.</title> |
| 5 <style> | 5 <style> |
| 6 #box { | 6 #box { |
| 7 position: relative; | 7 position: relative; |
| 8 left: 100px; | 8 left: 100px; |
| 9 top: 10px; | 9 top: 10px; |
| 10 height: 100px; | 10 height: 100px; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 document.getElementById('result').innerHTML = 'PASS: All events have bee
n received as expected.'; | 40 document.getElementById('result').innerHTML = 'PASS: All events have bee
n received as expected.'; |
| 41 if (window.testRunner) | 41 if (window.testRunner) |
| 42 testRunner.notifyDone(); | 42 testRunner.notifyDone(); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 function recordAnimationEnd() { | 46 function recordAnimationEnd() { |
| 47 endEventReceived = true; | 47 endEventReceived = true; |
| 48 document.getElementById('box').className = ''; | 48 document.getElementById('box').className = ''; |
| 49 // Launch again the animation to catch the animation iteration events this
time. | 49 // Launch again the animation to catch the animation iteration events this
time. |
| 50 setTimeout(function () { | 50 requestAnimationFrame(function () { |
| 51 document.getElementById('box').style.animationIterationCount = "infinite
"; | 51 document.getElementById('box').style.animationIterationCount = "infinite
"; |
| 52 document.getElementById('box').className = 'animate'; | 52 document.getElementById('box').className = 'animate'; |
| 53 }, 200); | 53 }); |
| 54 } | 54 } |
| 55 </script> | 55 </script> |
| 56 </head> | 56 </head> |
| 57 <body> | 57 <body> |
| 58 Tests that unprefixed animation events are correctly fired when using html event
listeners. | 58 Tests that unprefixed animation events are correctly fired when using html event
listeners. |
| 59 <pre id="result">FAIL: No animation events received</pre> | 59 <pre id="result">FAIL: No animation events received</pre> |
| 60 <div id="box" onanimationstart="recordAnimationStart();" onanimationend="recordA
nimationEnd();" onanimationiteration="recordAnimationIteration();" class="animat
e"></div> | 60 <div id="box" onanimationstart="recordAnimationStart();" onanimationend="recordA
nimationEnd();" onanimationiteration="recordAnimationIteration();" class="animat
e"></div> |
| 61 </body> | 61 </body> |
| 62 </html> | 62 </html> |
| OLD | NEW |