Chromium Code Reviews| Index: LayoutTests/fast/events/constructors/media-query-list-event-constructor.html |
| diff --git a/LayoutTests/fast/events/constructors/media-query-list-event-constructor.html b/LayoutTests/fast/events/constructors/media-query-list-event-constructor.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c42ae784f19cc24f54b94da026b1e84fa89b3df4 |
| --- /dev/null |
| +++ b/LayoutTests/fast/events/constructors/media-query-list-event-constructor.html |
| @@ -0,0 +1,31 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="../../../resources/js-test.js"></script> |
| +</head> |
| +<body> |
| +<script> |
| + |
| +description("This tests the constructor for the MediaQueryListEvent DOM class."); |
| + |
| +// No initializer passed. |
| +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.
|
| +shouldBe("new MediaQueryListEvent('eventType').cancelable", "false"); |
| +shouldBeEmptyString("new MediaQueryListEvent('eventType').media"); |
| +shouldBe("new MediaQueryListEvent('eventType').matches", "false"); |
| + |
| +// Bubbles and cancelable true, media and matches are missing. |
| +shouldBe("new MediaQueryListEvent('eventType', { bubbles: true, cancelable: true }).bubbles", "true"); |
| +shouldBe("new MediaQueryListEvent('eventType', { bubbles: true, cancelable: true }).cancelable", "true"); |
| +shouldBeEmptyString("new MediaQueryListEvent('eventType').media"); |
| +shouldBe("new MediaQueryListEvent('eventType').matches", "false"); |
| + |
| +// media is passed. |
| +shouldBeEqualToString("new MediaQueryListEvent('eventType', { media: 'string' }).media", "string"); |
| + |
| +// matches is passed. |
| +shouldBe("new MediaQueryListEvent('eventType', { matches: true }).matches", "true"); |
| + |
| +</script> |
| +</body> |
| +</html> |