Bug 1464091 - Test ascii-case-insensitivity of media query expressions - r=heycam
MozReview-Commit-ID: 49pmJQXuvGo
--- 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>