Bug 1384225 - stylo: Error reporting for unknown media features. Tests. r=jdm
authorFernando Jimenez Moreno <ferjmoreno@gmail.com>
Sat, 09 Sep 2017 11:32:01 +0200
changeset 429388 0dadc40f8fd55e2a86eb444419550035ecf0ae8a
parent 429341 e0d88cd771d6791be4eaed4ada9315f4b26e2ad1
child 429389 0d8847995698e0493fb3dec26864d01061d4611e
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs1384225
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1384225 - stylo: Error reporting for unknown media features. Tests. r=jdm
layout/style/test/test_css_parse_error_smoketest.html
--- a/layout/style/test/test_css_parse_error_smoketest.html
+++ b/layout/style/test/test_css_parse_error_smoketest.html
@@ -31,16 +31,26 @@
 
     { css: "x| {}", error: "Unknown namespace prefix ‘x’.  Ruleset ignored due to bad selector." },
     { css: "a> {}", error: "Dangling combinator.  Ruleset ignored due to bad selector." },
     { css: "~ {}", error: "Selector expected.  Ruleset ignored due to bad selector." },
     { css: "| {}", error: "Expected element name or ‘*’ but found ‘ ’.  Ruleset ignored due to bad selector." },
     { css: ". {}", error: "Expected identifier for class selector but found ‘ ’.  Ruleset ignored due to bad selector." },
 
     { css: ":not() {}", error: "Missing argument in negation pseudo-class ‘)’.  Ruleset ignored due to bad selector." },
+
+    { css: "@media (totally-unknown-feature) {}", error: "Expected media feature name but found ‘totally-unknown-feature’." },
+    { css: "@media \"foo\" {}", error: "Expected identifier in media list but found ‘\"foo\"’." },
+    { css: "@media (min-width) {}", error: "Media features with min- or max- must have a value." },
+    { css: "@media (device-height: -1px) {}", error: "Found invalid value for media feature." },
+    { css: "@media (min-width: -1px) {}", error: "Found invalid value for media feature." },
+    { css: "@media (min-resolution: 2) {}", error: "Found invalid value for media feature." },
+    { css: "@media (min-monochrome: 1.1) {}", error: "Found invalid value for media feature." },
+    { css: "@media (min-aspect-ratio: 1) {}", error: "Found invalid value for media feature." },
+    { css: "@media (orientation: invalid-orientation-value) {}", error: "Found invalid value for media feature." },
   ];
 
   var test = -1;
   function nextTest() {
     test++;
     if (test == tests.length) {
       SimpleTest.finish();
       return;