Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Unified Diff: LayoutTests/fast/media/mq-invalid-media-type-matchMedia.html

Issue 867363002: Some invalid media queries are parsed as valid (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a test Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/media/mq-invalid-media-type-matchMedia.html
diff --git a/LayoutTests/fast/media/mq-invalid-media-type-matchMedia.html b/LayoutTests/fast/media/mq-invalid-media-type-matchMedia.html
new file mode 100644
index 0000000000000000000000000000000000000000..b404b63f6fd57e5047c2e4b5fd3de5802e3c6e9a
--- /dev/null
+++ b/LayoutTests/fast/media/mq-invalid-media-type-matchMedia.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS3 media query test: 'not', 'and', 'only', 'or' are invalid media types.</title>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+ shouldBe(window.matchMedia("not not").media, "not all");
+ shouldBe(window.matchMedia("not and").media, "not all");
+ shouldBe(window.matchMedia("not only").media, "not all");
+ shouldBe(window.matchMedia("not or").media, "not all");
+ shouldBe(window.matchMedia("not (orientation)").media, "not all");
+ shouldBe(window.matchMedia("only (orientation)").media, "not all");
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698