Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: LayoutTests/animations/animation-events-unprefixed-04.html

Issue 263553010: Make sure we correctly dispatch custom events having the same names as unprefixed animations events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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);
48 document.dispatchEvent(custom);
49 custom = document.createEvent('CustomEvent');
50 custom.initCustomEvent('animationiteration', true, true);
51 document.dispatchEvent(custom);
52 custom = document.createEvent('CustomEvent');
53 custom.initCustomEvent('animationend', true, true);
54 document.dispatchEvent(custom);
55 </script>
56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698