Chromium Code Reviews| 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 shouldBe("new MediaQueryListEvent('eventType').bubbles", "false"); | |
|
haraken
2014/12/12 05:12:07
Nit: You can use shouldBeFalse and shouldBeTrue.
bashi
2014/12/12 08:58:43
Done.
| |
| 13 shouldBe("new MediaQueryListEvent('eventType').cancelable", "false"); | |
| 14 shouldBeEmptyString("new MediaQueryListEvent('eventType').media"); | |
| 15 shouldBe("new MediaQueryListEvent('eventType').matches", "false"); | |
| 16 | |
| 17 // Bubbles and cancelable true, media and matches are missing. | |
| 18 shouldBe("new MediaQueryListEvent('eventType', { bubbles: true, cancelable: true }).bubbles", "true"); | |
| 19 shouldBe("new MediaQueryListEvent('eventType', { bubbles: true, cancelable: true }).cancelable", "true"); | |
| 20 shouldBeEmptyString("new MediaQueryListEvent('eventType').media"); | |
| 21 shouldBe("new MediaQueryListEvent('eventType').matches", "false"); | |
| 22 | |
| 23 // media is passed. | |
| 24 shouldBeEqualToString("new MediaQueryListEvent('eventType', { media: 'string' }) .media", "string"); | |
| 25 | |
| 26 // matches is passed. | |
| 27 shouldBe("new MediaQueryListEvent('eventType', { matches: true }).matches", "tru e"); | |
| 28 | |
| 29 </script> | |
| 30 </body> | |
| 31 </html> | |
| OLD | NEW |