| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <script> |
| 8 |
| 9 description("This tests the constructor for the MediaQueryListEvent DOM class.")
; |
| 10 |
| 11 // No initializer passed. |
| 12 shouldBeFalse("new MediaQueryListEvent('eventType').bubbles"); |
| 13 shouldBeFalse("new MediaQueryListEvent('eventType').cancelable"); |
| 14 shouldBeEmptyString("new MediaQueryListEvent('eventType').media"); |
| 15 shouldBeFalse("new MediaQueryListEvent('eventType').matches"); |
| 16 |
| 17 // Bubbles and cancelable true, media and matches are missing. |
| 18 shouldBeTrue("new MediaQueryListEvent('eventType', { bubbles: true, cancelable:
true }).bubbles"); |
| 19 shouldBeTrue("new MediaQueryListEvent('eventType', { bubbles: true, cancelable:
true }).cancelable"); |
| 20 shouldBeEmptyString("new MediaQueryListEvent('eventType').media"); |
| 21 shouldBeFalse("new MediaQueryListEvent('eventType').matches"); |
| 22 |
| 23 // media is passed. |
| 24 shouldBeEqualToString("new MediaQueryListEvent('eventType', { media: 'string' })
.media", "string"); |
| 25 |
| 26 // matches is passed. |
| 27 shouldBeTrue("new MediaQueryListEvent('eventType', { matches: true }).matches"); |
| 28 |
| 29 </script> |
| 30 </body> |
| 31 </html> |
| OLD | NEW |