OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Tests that custom events with prefixed animations names are correctly d
ispatched.</title> |
| 5 <script> |
| 6 if (window.testRunner) { |
| 7 testRunner.dumpAsText(); |
| 8 testRunner.waitUntilDone(); |
| 9 } |
| 10 |
| 11 document.addEventListener('animationstart', function(e) { |
| 12 document.getElementById('result').innerHTML += 'FAIL: animationstart event
listener should not have been called.<br>'; |
| 13 }, false); |
| 14 |
| 15 document.addEventListener('webkitAnimationStart', function(e) { |
| 16 document.getElementById('result').innerHTML += 'PASS: webkitAnimationStart
event listener has been called.<br>'; |
| 17 }, false); |
| 18 |
| 19 document.addEventListener('animationiteration', function(e) { |
| 20 document.getElementById('result').innerHTML += 'FAIL: animationiteration e
vent listener should not have been called.<br>'; |
| 21 }, false); |
| 22 |
| 23 document.addEventListener('webkitAnimationIteration', function(e) { |
| 24 document.getElementById('result').innerHTML += 'PASS: webkitAnimationItera
tion event listener has been called.<br>'; |
| 25 }, false); |
| 26 |
| 27 document.addEventListener('animationend', function(e) { |
| 28 document.getElementById('result').innerHTML += 'FAIL: animationend event l
istener should not have been called.'; |
| 29 if (window.testRunner) |
| 30 testRunner.notifyDone(); |
| 31 }, false); |
| 32 |
| 33 document.addEventListener('webkitAnimationEnd', function(e) { |
| 34 document.getElementById('result').innerHTML += 'PASS: webkitAnimationEnd e
vent has been called.'; |
| 35 if (window.testRunner) |
| 36 testRunner.notifyDone(); |
| 37 }, false); |
| 38 |
| 39 </script> |
| 40 </head> |
| 41 <body> |
| 42 Tests that custom events with prefixed animations names are correctly dispatched
. |
| 43 <pre id="result"></pre> |
| 44 </body> |
| 45 <script> |
| 46 var custom = document.createEvent('CustomEvent'); |
| 47 custom.initCustomEvent('webkitAnimationStart', true, true); |
| 48 document.dispatchEvent(custom); |
| 49 custom = document.createEvent('CustomEvent'); |
| 50 custom.initCustomEvent('webkitAnimationIteration', true, true); |
| 51 document.dispatchEvent(custom); |
| 52 custom = document.createEvent('CustomEvent'); |
| 53 custom.initCustomEvent('webkitAnimationEnd', true, true); |
| 54 document.dispatchEvent(custom); |
| 55 </script> |
| 56 </html> |
OLD | NEW |