0f6529d8c5887ed743f10fecb76e6e49f0654979
[WebKit-https.git] / LayoutTests / animations / animation-events-create.html
1 <html>
2 <head>
3 <script src="../fast/js/resources/js-test-pre.js"></script>
4 </head>
5 <body>
6 <p id="description"></p>
7 <div id="console"></div>
8 <script>
9
10 description("Test dynamic creation of WebKitAnimationEvent.");
11
12 if (document.createEvent)
13     testPassed("document.createEvent exists");
14 else
15     testFailed("document.createEvent missing");
16
17 debug("");
18 debug("Test creation of WebKitAnimationEvent");
19
20 var ev = document.createEvent("WebKitAnimationEvent");
21
22 shouldBe("typeof(ev)", "'object'");
23 shouldBe("ev.animationName", "''");
24 shouldBe("ev.elapsedTime", "0.0");
25
26 debug("");
27 debug("Create a MouseEvent and make sure it doesn't have the WebKitAnimationEnd event properties");
28
29 ev = document.createEvent("MouseEvent");
30
31 shouldBe("typeof(ev)", "'object'");
32 shouldBe("ev.animationName", "undefined");
33 shouldBe("ev.elapsedTime", "undefined");
34
35 debug("");
36 successfullyParsed = true;
37
38 </script>
39 <script src="../fast/js/resources/js-test-post.js"></script>
40 </body>
41 </html>