Bug 1464091 - Test ascii-case-insensitivity of media query expressions. r=heycam, a=RyanVM
authorGerald Squelart <gsquelart@mozilla.com>
Tue, 05 Jun 2018 16:18:23 +1000
changeset 471311 91934961833a
parent 471310 bbba8cee7041
child 471312 585281dde960
push id9364
push userryanvm@gmail.com
push date2018-06-13 23:32 +0000
treeherdermozilla-beta@91934961833a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, RyanVM
bugs1464091
milestone61.0
Bug 1464091 - Test ascii-case-insensitivity of media query expressions. r=heycam, a=RyanVM MozReview-Commit-ID: 49pmJQXuvGo
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/mediaqueries/mq-case-insensitive-001.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -162734,16 +162734,28 @@
       [
        "/css/reference/ref-filled-green-100px-square.xht",
        "=="
       ]
      ],
      {}
     ]
    ],
+   "css/mediaqueries/mq-case-insensitive-001.html": [
+    [
+     "/css/mediaqueries/mq-case-insensitive-001.html",
+     [
+      [
+       "/css/reference/ref-filled-green-100px-square.xht",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/mediaqueries/mq-invalid-media-type-001.html": [
     [
      "/css/mediaqueries/mq-invalid-media-type-001.html",
      [
       [
        "/css/reference/ref-filled-green-100px-square.xht",
        "=="
       ]
@@ -541677,16 +541689,20 @@
   "css/mediaqueries/mq-calc-004.html": [
    "7cad13aa87e8a0d95dc9e35eb7d1dec7930939fb",
    "reftest"
   ],
   "css/mediaqueries/mq-calc-005.html": [
    "75334bbcf4ef412b9976c59e1efe2177ad62b465",
    "reftest"
   ],
+  "css/mediaqueries/mq-case-insensitive-001.html": [
+   "33087ab04eea830e3fcf10820fbfd167709bd18a",
+   "reftest"
+  ],
   "css/mediaqueries/mq-invalid-media-type-001.html": [
    "4b11afa3270c95b0a2736f114627b6f02346805a",
    "reftest"
   ],
   "css/mediaqueries/mq-invalid-media-type-002.html": [
    "42760d383b11e870f663e11624c5de8d7dfaa1ec",
    "reftest"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/mediaqueries/mq-case-insensitive-001.html
@@ -0,0 +1,43 @@
+<!doctype html>
+<meta charset="utf-8">
+<html>
+ <head>
+  <title>Test: ASCII-case-insensitivity of media queries</title>
+  <link rel="author" title="Gerald Squelart" href="mailto:gerald@mozilla.com">
+  <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters">
+  <link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+  <style type="text/css">
+
+  div {
+   width: 100px;
+   height: 100px;
+  }
+
+  @media all and (height) and (min-width:0) and (orientation:landscape) {
+   div { background-color: red; }
+  }
+  @media all and (height) and (min-width:0) and (orientation:portrait) {
+   div { background-color: red; }
+  }
+
+  @MeDIa aLL and (Height) and (mIN-Width:0cM) and (orienTAtion:LandScape) {
+   div { background-color: green; }
+  }
+  @MeDIa All and (heiGHt) and (Min-widtH:0MM) and (Orientation:porTrait) {
+   div { background-color: green; }
+  }
+
+  /* In some languages Non-ASCII 'İ' (Latin capital I with dot above) may be
+     lowercased to ASCII 'i'; This would make "heİght" compare the same as
+     "height", which would be incorrect. */
+  @media all and (heİght) {
+   div { background-color: red; }
+  }
+
+  </style>
+ </head>
+ <body>
+  <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+  <div></div>
+ </body>
+</html>