Bug 1464091 - Test ascii-case-insensitivity of media query expressions - r=heycam
authorGerald Squelart <gsquelart@mozilla.com>
Tue, 05 Jun 2018 16:18:23 +1000
changeset 476525 32a24b5f542d6f14f11c8c2cc32180066c4c8b62
parent 476524 8a3088e2b4673c3badbbe015e1ce0ad1e551e703
child 476526 2ec05fde848fd82e349ceaaa6a0b2e1d34fc8339
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1464091
milestone62.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 1464091 - Test ascii-case-insensitivity of media query expressions - r=heycam 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
@@ -162842,16 +162842,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",
        "=="
       ]
@@ -548350,16 +548362,20 @@
   "css/mediaqueries/mq-calc-004.html": [
    "7cad13aa87e8a0d95dc9e35eb7d1dec7930939fb",
    "reftest"
   ],
   "css/mediaqueries/mq-calc-005.html": [
    "75334bbcf4ef412b9976c59e1efe2177ad62b465",
    "reftest"
   ],
+  "css/mediaqueries/mq-case-insensitive-001.html": [
+   "5d94915b19757b3ee5ac49fb2fd119c82317ddf3",
+   "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>