OLD | NEW |
1 <head> | 1 <head> |
2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 </head> | 3 </head> |
4 <body> | 4 <body> |
5 <script> | 5 <script> |
6 description("This tests that document.createEvent is hooked up for all Event
interfaces (and alternatives) and creates the right instance.") | 6 description("This tests that document.createEvent is hooked up for all Event
interfaces (and alternatives) and creates the right instance.") |
7 | 7 |
8 // AnimationEvent | 8 // AnimationEvent |
9 shouldBeTrue("document.createEvent('AnimationEvent') instanceof window.Anima
tionEvent"); | 9 shouldBeTrue("document.createEvent('AnimationEvent') instanceof window.Anima
tionEvent"); |
10 shouldBeTrue("document.createEvent('AnimationEvent') instanceof window.Event
"); | 10 shouldBeTrue("document.createEvent('AnimationEvent') instanceof window.Event
"); |
11 shouldBeTrue("document.createEvent('AnimationEvent').constructor === window.
AnimationEvent"); | 11 shouldBeTrue("document.createEvent('AnimationEvent').constructor === window.
AnimationEvent"); |
12 | 12 |
13 // Event | 13 // Event |
14 shouldBeTrue("document.createEvent('Event') instanceof window.Event"); | 14 shouldBeTrue("document.createEvent('Event') instanceof window.Event"); |
15 shouldBeTrue("document.createEvent('Event').constructor === window.Event"); | 15 shouldBeTrue("document.createEvent('Event').constructor === window.Event"); |
16 | 16 |
17 // Events (Event alternative) | 17 // Events (Event alternative) |
18 shouldBeTrue("document.createEvent('Events') instanceof window.Event"); | 18 shouldBeTrue("document.createEvent('Events') instanceof window.Event"); |
19 shouldBeTrue("document.createEvent('Events').constructor === window.Event"); | 19 shouldBeTrue("document.createEvent('Events').constructor === window.Event"); |
20 | 20 |
21 // HTMLEvents (Event alternative) | 21 // HTMLEvents (Event alternative) |
22 shouldBeTrue("document.createEvent('HTMLEvents') instanceof window.Event"); | 22 shouldBeTrue("document.createEvent('HTMLEvents') instanceof window.Event"); |
23 shouldBeTrue("document.createEvent('HTMLEvents').constructor === window.Even
t"); | 23 shouldBeTrue("document.createEvent('HTMLEvents').constructor === window.Even
t"); |
24 | 24 |
25 // BeforeLoadEvent | |
26 shouldBeTrue("document.createEvent('BeforeLoadEvent') instanceof window.Befo
reLoadEvent"); | |
27 shouldBeTrue("document.createEvent('BeforeLoadEvent') instanceof window.Even
t"); | |
28 shouldBeTrue("document.createEvent('BeforeLoadEvent').constructor === window
.BeforeLoadEvent"); | |
29 | |
30 // CompositionEvent | 25 // CompositionEvent |
31 shouldBeTrue("document.createEvent('CompositionEvent') instanceof window.Com
positionEvent"); | 26 shouldBeTrue("document.createEvent('CompositionEvent') instanceof window.Com
positionEvent"); |
32 shouldBeTrue("document.createEvent('CompositionEvent') instanceof window.Eve
nt"); | 27 shouldBeTrue("document.createEvent('CompositionEvent') instanceof window.Eve
nt"); |
33 shouldBeTrue("document.createEvent('CompositionEvent').constructor === windo
w.CompositionEvent"); | 28 shouldBeTrue("document.createEvent('CompositionEvent').constructor === windo
w.CompositionEvent"); |
34 | 29 |
35 // CustomEvent | 30 // CustomEvent |
36 shouldBeTrue("document.createEvent('CustomEvent') instanceof window.CustomEv
ent"); | 31 shouldBeTrue("document.createEvent('CustomEvent') instanceof window.CustomEv
ent"); |
37 shouldBeTrue("document.createEvent('CustomEvent') instanceof window.Event"); | 32 shouldBeTrue("document.createEvent('CustomEvent') instanceof window.Event"); |
38 shouldBeTrue("document.createEvent('CustomEvent').constructor === window.Cus
tomEvent"); | 33 shouldBeTrue("document.createEvent('CustomEvent').constructor === window.Cus
tomEvent"); |
39 | 34 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 debug("'document.createEvent(propertyName).constructor === windo
w[propertyName]' with propertyName: " + propertyName + " threw an exception: " +
e); | 261 debug("'document.createEvent(propertyName).constructor === windo
w[propertyName]' with propertyName: " + propertyName + " threw an exception: " +
e); |
267 } | 262 } |
268 } | 263 } |
269 } | 264 } |
270 shouldBeTrue('allEventInterfacesCreateEvents'); | 265 shouldBeTrue('allEventInterfacesCreateEvents'); |
271 </script> | 266 </script> |
272 | 267 |
273 | 268 |
274 | 269 |
275 </body> | 270 </body> |
OLD | NEW |