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 shouldBeTrue("document.createEvent('EvENt') instanceof window.Event"); |
| 17 shouldBeTrue("document.createEvent('EvENt').constructor === window.Event"); |
16 | 18 |
17 // Events (Event alternative) | 19 // Events (Event alternative) |
18 shouldBeTrue("document.createEvent('Events') instanceof window.Event"); | 20 shouldBeTrue("document.createEvent('Events') instanceof window.Event"); |
19 shouldBeTrue("document.createEvent('Events').constructor === window.Event"); | 21 shouldBeTrue("document.createEvent('Events').constructor === window.Event"); |
| 22 shouldBeTrue("document.createEvent('EvENts') instanceof window.Event"); |
| 23 shouldBeTrue("document.createEvent('EvENts').constructor === window.Event"); |
20 | 24 |
21 // HTMLEvents (Event alternative) | 25 // HTMLEvents (Event alternative) |
22 shouldBeTrue("document.createEvent('HTMLEvents') instanceof window.Event"); | 26 shouldBeTrue("document.createEvent('HTMLEvents') instanceof window.Event"); |
23 shouldBeTrue("document.createEvent('HTMLEvents').constructor === window.Even
t"); | 27 shouldBeTrue("document.createEvent('HTMLEvents').constructor === window.Even
t"); |
| 28 shouldBeTrue("document.createEvent('HTMLEvENts') instanceof window.Event"); |
| 29 shouldBeTrue("document.createEvent('HTMLEvENts').constructor === window.Even
t"); |
24 | 30 |
25 // CompositionEvent | 31 // CompositionEvent |
26 shouldBeTrue("document.createEvent('CompositionEvent') instanceof window.Com
positionEvent"); | 32 shouldBeTrue("document.createEvent('CompositionEvent') instanceof window.Com
positionEvent"); |
27 shouldBeTrue("document.createEvent('CompositionEvent') instanceof window.Eve
nt"); | 33 shouldBeTrue("document.createEvent('CompositionEvent') instanceof window.Eve
nt"); |
28 shouldBeTrue("document.createEvent('CompositionEvent').constructor === windo
w.CompositionEvent"); | 34 shouldBeTrue("document.createEvent('CompositionEvent').constructor === windo
w.CompositionEvent"); |
29 | 35 |
30 // CustomEvent | 36 // CustomEvent |
31 shouldBeTrue("document.createEvent('CustomEvent') instanceof window.CustomEv
ent"); | 37 shouldBeTrue("document.createEvent('CustomEvent') instanceof window.CustomEv
ent"); |
32 shouldBeTrue("document.createEvent('CustomEvent') instanceof window.Event"); | 38 shouldBeTrue("document.createEvent('CustomEvent') instanceof window.Event"); |
33 shouldBeTrue("document.createEvent('CustomEvent').constructor === window.Cus
tomEvent"); | 39 shouldBeTrue("document.createEvent('CustomEvent').constructor === window.Cus
tomEvent"); |
| 40 shouldBeTrue("document.createEvent('CustomEvENt') instanceof window.CustomEv
ent"); |
| 41 shouldBeTrue("document.createEvent('CustomEvENt') instanceof window.Event"); |
| 42 shouldBeTrue("document.createEvent('CustomEvENt').constructor === window.Cus
tomEvent"); |
34 | 43 |
35 // ErrorEvent | 44 // ErrorEvent |
36 shouldBeTrue("document.createEvent('ErrorEvent') instanceof window.ErrorEven
t"); | 45 shouldBeTrue("document.createEvent('ErrorEvent') instanceof window.ErrorEven
t"); |
37 shouldBeTrue("document.createEvent('ErrorEvent') instanceof window.Event"); | 46 shouldBeTrue("document.createEvent('ErrorEvent') instanceof window.Event"); |
38 shouldBeTrue("document.createEvent('ErrorEvent').constructor === window.Erro
rEvent"); | 47 shouldBeTrue("document.createEvent('ErrorEvent').constructor === window.Erro
rEvent"); |
39 | 48 |
40 // HashChangeEvent | 49 // HashChangeEvent |
41 shouldBeTrue("document.createEvent('HashChangeEvent') instanceof window.Hash
ChangeEvent"); | 50 shouldBeTrue("document.createEvent('HashChangeEvent') instanceof window.Hash
ChangeEvent"); |
42 shouldBeTrue("document.createEvent('HashChangeEvent') instanceof window.Even
t"); | 51 shouldBeTrue("document.createEvent('HashChangeEvent') instanceof window.Even
t"); |
43 shouldBeTrue("document.createEvent('HashChangeEvent').constructor === window
.HashChangeEvent"); | 52 shouldBeTrue("document.createEvent('HashChangeEvent').constructor === window
.HashChangeEvent"); |
(...skipping 13 matching lines...) Expand all Loading... |
57 // MessageEvent | 66 // MessageEvent |
58 shouldBeTrue("document.createEvent('MessageEvent') instanceof window.Message
Event"); | 67 shouldBeTrue("document.createEvent('MessageEvent') instanceof window.Message
Event"); |
59 shouldBeTrue("document.createEvent('MessageEvent') instanceof window.Event")
; | 68 shouldBeTrue("document.createEvent('MessageEvent') instanceof window.Event")
; |
60 shouldBeTrue("document.createEvent('MessageEvent').constructor === window.Me
ssageEvent"); | 69 shouldBeTrue("document.createEvent('MessageEvent').constructor === window.Me
ssageEvent"); |
61 | 70 |
62 // MouseEvent | 71 // MouseEvent |
63 shouldBeTrue("document.createEvent('MouseEvent') instanceof window.MouseEven
t"); | 72 shouldBeTrue("document.createEvent('MouseEvent') instanceof window.MouseEven
t"); |
64 shouldBeTrue("document.createEvent('MouseEvent') instanceof window.UIEvent")
; | 73 shouldBeTrue("document.createEvent('MouseEvent') instanceof window.UIEvent")
; |
65 shouldBeTrue("document.createEvent('MouseEvent') instanceof window.Event"); | 74 shouldBeTrue("document.createEvent('MouseEvent') instanceof window.Event"); |
66 shouldBeTrue("document.createEvent('MouseEvent').constructor === window.Mous
eEvent"); | 75 shouldBeTrue("document.createEvent('MouseEvent').constructor === window.Mous
eEvent"); |
| 76 shouldBeTrue("document.createEvent('MouseEvENt') instanceof window.MouseEven
t"); |
| 77 shouldBeTrue("document.createEvent('MouseEvENt') instanceof window.UIEvent")
; |
| 78 shouldBeTrue("document.createEvent('MouseEvENt') instanceof window.Event"); |
| 79 shouldBeTrue("document.createEvent('MouseEvENt').constructor === window.Mous
eEvent"); |
67 | 80 |
68 // MouseEvents (MouseEvent alternative) | 81 // MouseEvents (MouseEvent alternative) |
69 shouldBeTrue("document.createEvent('MouseEvents') instanceof window.MouseEve
nt"); | 82 shouldBeTrue("document.createEvent('MouseEvents') instanceof window.MouseEve
nt"); |
70 shouldBeTrue("document.createEvent('MouseEvents') instanceof window.UIEvent"
); | 83 shouldBeTrue("document.createEvent('MouseEvents') instanceof window.UIEvent"
); |
71 shouldBeTrue("document.createEvent('MouseEvents') instanceof window.Event"); | 84 shouldBeTrue("document.createEvent('MouseEvents') instanceof window.Event"); |
72 shouldBeTrue("document.createEvent('MouseEvents').constructor === window.Mou
seEvent"); | 85 shouldBeTrue("document.createEvent('MouseEvents').constructor === window.Mou
seEvent"); |
| 86 shouldBeTrue("document.createEvent('MouseEvENts') instanceof window.MouseEve
nt"); |
| 87 shouldBeTrue("document.createEvent('MouseEvENts') instanceof window.UIEvent"
); |
| 88 shouldBeTrue("document.createEvent('MouseEvENts') instanceof window.Event"); |
| 89 shouldBeTrue("document.createEvent('MouseEvENts').constructor === window.Mou
seEvent"); |
73 | 90 |
74 // MutationEvent | 91 // MutationEvent |
75 shouldBeTrue("document.createEvent('MutationEvent') instanceof window.Mutati
onEvent"); | 92 shouldBeTrue("document.createEvent('MutationEvent') instanceof window.Mutati
onEvent"); |
76 shouldBeTrue("document.createEvent('MutationEvent') instanceof window.Event"
); | 93 shouldBeTrue("document.createEvent('MutationEvent') instanceof window.Event"
); |
77 shouldBeTrue("document.createEvent('MutationEvent').constructor === window.M
utationEvent"); | 94 shouldBeTrue("document.createEvent('MutationEvent').constructor === window.M
utationEvent"); |
78 | 95 |
79 // MutationEvents (MutationEvent alternative) | 96 // MutationEvents (MutationEvent alternative) |
80 shouldBeTrue("document.createEvent('MutationEvents') instanceof window.Mutat
ionEvent"); | 97 shouldBeTrue("document.createEvent('MutationEvents') instanceof window.Mutat
ionEvent"); |
81 shouldBeTrue("document.createEvent('MutationEvents') instanceof window.Event
"); | 98 shouldBeTrue("document.createEvent('MutationEvents') instanceof window.Event
"); |
82 shouldBeTrue("document.createEvent('MutationEvents').constructor === window.
MutationEvent"); | 99 shouldBeTrue("document.createEvent('MutationEvents').constructor === window.
MutationEvent"); |
(...skipping 21 matching lines...) Expand all Loading... |
104 // TextEvent | 121 // TextEvent |
105 shouldBeTrue("document.createEvent('TextEvent') instanceof window.TextEvent"
); | 122 shouldBeTrue("document.createEvent('TextEvent') instanceof window.TextEvent"
); |
106 shouldBeTrue("document.createEvent('TextEvent') instanceof window.UIEvent"); | 123 shouldBeTrue("document.createEvent('TextEvent') instanceof window.UIEvent"); |
107 shouldBeTrue("document.createEvent('TextEvent') instanceof window.Event"); | 124 shouldBeTrue("document.createEvent('TextEvent') instanceof window.Event"); |
108 shouldBeTrue("document.createEvent('TextEvent').constructor === window.TextE
vent"); | 125 shouldBeTrue("document.createEvent('TextEvent').constructor === window.TextE
vent"); |
109 | 126 |
110 // UIEvent | 127 // UIEvent |
111 shouldBeTrue("document.createEvent('UIEvent') instanceof window.UIEvent"); | 128 shouldBeTrue("document.createEvent('UIEvent') instanceof window.UIEvent"); |
112 shouldBeTrue("document.createEvent('UIEvent') instanceof window.Event"); | 129 shouldBeTrue("document.createEvent('UIEvent') instanceof window.Event"); |
113 shouldBeTrue("document.createEvent('UIEvent').constructor === window.UIEvent
"); | 130 shouldBeTrue("document.createEvent('UIEvent').constructor === window.UIEvent
"); |
| 131 shouldBeTrue("document.createEvent('UIEvENt') instanceof window.UIEvent"); |
| 132 shouldBeTrue("document.createEvent('UIEvENt') instanceof window.Event"); |
| 133 shouldBeTrue("document.createEvent('UIEvENt').constructor === window.UIEvent
"); |
114 | 134 |
115 // UIEvents (UIEvent alternative) | 135 // UIEvents (UIEvent alternative) |
116 shouldBeTrue("document.createEvent('UIEvents') instanceof window.UIEvent"); | 136 shouldBeTrue("document.createEvent('UIEvents') instanceof window.UIEvent"); |
117 shouldBeTrue("document.createEvent('UIEvents') instanceof window.Event"); | 137 shouldBeTrue("document.createEvent('UIEvents') instanceof window.Event"); |
118 shouldBeTrue("document.createEvent('UIEvents').constructor === window.UIEven
t"); | 138 shouldBeTrue("document.createEvent('UIEvents').constructor === window.UIEven
t"); |
| 139 shouldBeTrue("document.createEvent('UIEvENts') instanceof window.UIEvent"); |
| 140 shouldBeTrue("document.createEvent('UIEvENts') instanceof window.Event"); |
| 141 shouldBeTrue("document.createEvent('UIEvENts').constructor === window.UIEven
t"); |
119 | 142 |
120 // TransitionEvent | 143 // TransitionEvent |
121 shouldBeTrue("document.createEvent('TransitionEvent') instanceof window.Tran
sitionEvent"); | 144 shouldBeTrue("document.createEvent('TransitionEvent') instanceof window.Tran
sitionEvent"); |
122 shouldBeTrue("document.createEvent('TransitionEvent') instanceof window.Even
t"); | 145 shouldBeTrue("document.createEvent('TransitionEvent') instanceof window.Even
t"); |
123 shouldBeTrue("document.createEvent('TransitionEvent').constructor === window
.TransitionEvent"); | 146 shouldBeTrue("document.createEvent('TransitionEvent').constructor === window
.TransitionEvent"); |
124 | 147 |
125 // WebKitAnimationEvent | 148 // WebKitAnimationEvent |
126 shouldBeTrue("document.createEvent('WebKitAnimationEvent') instanceof window
.WebKitAnimationEvent"); | 149 shouldBeTrue("document.createEvent('WebKitAnimationEvent') instanceof window
.WebKitAnimationEvent"); |
127 shouldBeTrue("document.createEvent('WebKitAnimationEvent') instanceof window
.Event"); | 150 shouldBeTrue("document.createEvent('WebKitAnimationEvent') instanceof window
.Event"); |
128 shouldBeTrue("document.createEvent('WebKitAnimationEvent').constructor === w
indow.WebKitAnimationEvent"); | 151 shouldBeTrue("document.createEvent('WebKitAnimationEvent').constructor === w
indow.WebKitAnimationEvent"); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 debug("'document.createEvent(propertyName).constructor === windo
w[propertyName]' with propertyName: " + propertyName + " threw an exception: " +
e); | 284 debug("'document.createEvent(propertyName).constructor === windo
w[propertyName]' with propertyName: " + propertyName + " threw an exception: " +
e); |
262 } | 285 } |
263 } | 286 } |
264 } | 287 } |
265 shouldBeTrue('allEventInterfacesCreateEvents'); | 288 shouldBeTrue('allEventInterfacesCreateEvents'); |
266 </script> | 289 </script> |
267 | 290 |
268 | 291 |
269 | 292 |
270 </body> | 293 </body> |
OLD | NEW |