JS Test Harness: Insert the stylesheet dynamically
[WebKit-https.git] / LayoutTests / fast / events / constructors / page-transition-event-constructor.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <script>
8
9 description("This tests the constructor for the PageTransitionEvent DOM class.");
10
11 // No initializer is passed.
12 shouldBe("new PageTransitionEvent('eventType').bubbles", "false");
13 shouldBe("new PageTransitionEvent('eventType').cancelable", "false");
14 shouldBe("new PageTransitionEvent('eventType').persisted", "false");
15
16 // bubbles is passed.
17 shouldBe("new PageTransitionEvent('eventType', { bubbles: false }).bubbles", "false");
18 shouldBe("new PageTransitionEvent('eventType', { bubbles: true }).bubbles", "true");
19
20 // cancelable is passed.
21 shouldBe("new PageTransitionEvent('eventType', { cancelable: false }).cancelable", "false");
22 shouldBe("new PageTransitionEvent('eventType', { cancelable: true }).cancelable", "true");
23
24 // persisted is passed.
25 shouldBe("new PageTransitionEvent('eventType', { persisted: false }).persisted", "false");
26 shouldBe("new PageTransitionEvent('eventType', { persisted: true }).persisted", "true");
27
28 // All initializers are passed.
29 shouldBe("new PageTransitionEvent('eventType', { bubbles: true, cancelable: true, persisted: true }).bubbles", "true");
30 shouldBe("new PageTransitionEvent('eventType', { bubbles: true, cancelable: true, persisted: true }).cancelable", "true");
31 shouldBe("new PageTransitionEvent('eventType', { bubbles: true, cancelable: true, persisted: true }).persisted", "true");
32
33 var successfullyParsed = true;
34 </script>
35 <script src="../../js/resources/js-test-post.js"></script>
36 </body>
37 </html>