| 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 (only unprefixed should be fired).</title> | 4 <title>Tests that unprefixed animation events are correctly fired when using h
tml event listeners (only unprefixed should be fired).</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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 document.getElementById('result').innerHTML = 'PASS: All events have bee
n received as expected.'; | 45 document.getElementById('result').innerHTML = 'PASS: All events have bee
n received as expected.'; |
| 46 if (window.testRunner) | 46 if (window.testRunner) |
| 47 testRunner.notifyDone(); | 47 testRunner.notifyDone(); |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 | 50 |
| 51 function recordAnimationEnd() { | 51 function recordAnimationEnd() { |
| 52 endEventReceived = true; | 52 endEventReceived = true; |
| 53 document.getElementById('box').className = ''; | 53 document.getElementById('box').className = ''; |
| 54 // Launch again the animation to catch the animation iteration events this
time. | 54 // Launch again the animation to catch the animation iteration events this
time. |
| 55 setTimeout(function () { | 55 requestAnimationFrame(function () { |
| 56 document.getElementById('box').style.animationIterationCount = "infinite
"; | 56 document.getElementById('box').style.animationIterationCount = "infinite
"; |
| 57 document.getElementById('box').className = 'animate'; | 57 document.getElementById('box').className = 'animate'; |
| 58 }, 200); | 58 }); |
| 59 } | 59 } |
| 60 </script> | 60 </script> |
| 61 </head> | 61 </head> |
| 62 <body> | 62 <body> |
| 63 Tests that unprefixed animation events are correctly fired when using html event
listeners (only unprefixed should be fired). | 63 Tests that unprefixed animation events are correctly fired when using html event
listeners (only unprefixed should be fired). |
| 64 <pre id="result">FAIL: No animation events received</pre> | 64 <pre id="result">FAIL: No animation events received</pre> |
| 65 <div id="box" onwebkitanimationstart="recordPrefixedEvent();" onwebkitanimatione
nd="recordPrefixedEvent();" onwebkitanimationiteration="recordPrefixedEvent();"
onanimationstart="recordAnimationStart();" onanimationend="recordAnimationEnd();
" onanimationiteration="recordAnimationIteration();" class="animate"></div> | 65 <div id="box" onwebkitanimationstart="recordPrefixedEvent();" onwebkitanimatione
nd="recordPrefixedEvent();" onwebkitanimationiteration="recordPrefixedEvent();"
onanimationstart="recordAnimationStart();" onanimationend="recordAnimationEnd();
" onanimationiteration="recordAnimationIteration();" class="animate"></div> |
| 66 </body> | 66 </body> |
| 67 </html> | 67 </html> |
| OLD | NEW |