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