| 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
"); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 // StorageEvent | 166 // StorageEvent |
| 167 shouldBeTrue("document.createEvent('StorageEvent') instanceof window.Storage
Event"); | 167 shouldBeTrue("document.createEvent('StorageEvent') instanceof window.Storage
Event"); |
| 168 shouldBeTrue("document.createEvent('StorageEvent') instanceof window.Event")
; | 168 shouldBeTrue("document.createEvent('StorageEvent') instanceof window.Event")
; |
| 169 shouldBeTrue("document.createEvent('StorageEvent').constructor === window.St
orageEvent"); | 169 shouldBeTrue("document.createEvent('StorageEvent').constructor === window.St
orageEvent"); |
| 170 | 170 |
| 171 // SVGEvents (Event alternative) | 171 // SVGEvents (Event alternative) |
| 172 shouldBeTrue("document.createEvent('SVGEvents') instanceof window.Event"); | 172 shouldBeTrue("document.createEvent('SVGEvents') instanceof window.Event"); |
| 173 shouldBeTrue("document.createEvent('SVGEvents').constructor === window.Event
"); | 173 shouldBeTrue("document.createEvent('SVGEvents').constructor === window.Event
"); |
| 174 | 174 |
| 175 // SVGZoomEvent | |
| 176 shouldBeTrue("document.createEvent('SVGZoomEvent') instanceof window.SVGZoom
Event"); | |
| 177 shouldBeTrue("document.createEvent('SVGZoomEvent') instanceof window.Event")
; | |
| 178 shouldBeTrue("document.createEvent('SVGZoomEvent').constructor === window.SV
GZoomEvent"); | |
| 179 | |
| 180 // SVGZoomEvents (SVGZoomEvent alternative) | |
| 181 shouldBeTrue("document.createEvent('SVGZoomEvents') instanceof window.SVGZoo
mEvent"); | |
| 182 shouldBeTrue("document.createEvent('SVGZoomEvents') instanceof window.Event"
); | |
| 183 shouldBeTrue("document.createEvent('SVGZoomEvents').constructor === window.S
VGZoomEvent"); | |
| 184 | |
| 185 // CloseEvent | 175 // CloseEvent |
| 186 shouldBeTrue("document.createEvent('CloseEvent') instanceof window.CloseEven
t"); | 176 shouldBeTrue("document.createEvent('CloseEvent') instanceof window.CloseEven
t"); |
| 187 shouldBeTrue("document.createEvent('CloseEvent') instanceof window.Event"); | 177 shouldBeTrue("document.createEvent('CloseEvent') instanceof window.Event"); |
| 188 shouldBeTrue("document.createEvent('CloseEvent').constructor === window.Clos
eEvent"); | 178 shouldBeTrue("document.createEvent('CloseEvent').constructor === window.Clos
eEvent"); |
| 189 | 179 |
| 190 // The following are here for completeness, but won't until there is more wi
despread support for them. | 180 // The following are here for completeness, but won't until there is more wi
despread support for them. |
| 191 | 181 |
| 192 // #if ENABLE(WEB_AUDIO) | 182 // #if ENABLE(WEB_AUDIO) |
| 193 // AudioProcessingEvent | 183 // AudioProcessingEvent |
| 194 // shouldBeTrue("document.createEvent('AudioProcessingEvent') instanceof win
dow.AudioProcessingEvent"); | 184 // shouldBeTrue("document.createEvent('AudioProcessingEvent') instanceof win
dow.AudioProcessingEvent"); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 debug("'document.createEvent(propertyName).constructor === windo
w[propertyName]' with propertyName: " + propertyName + " threw an exception: " +
e); | 262 debug("'document.createEvent(propertyName).constructor === windo
w[propertyName]' with propertyName: " + propertyName + " threw an exception: " +
e); |
| 273 } | 263 } |
| 274 } | 264 } |
| 275 } | 265 } |
| 276 shouldBeTrue('allEventInterfacesCreateEvents'); | 266 shouldBeTrue('allEventInterfacesCreateEvents'); |
| 277 </script> | 267 </script> |
| 278 | 268 |
| 279 | 269 |
| 280 | 270 |
| 281 </body> | 271 </body> |
| OLD | NEW |