4 https://bugzilla.mozilla.org/show_bug.cgi?id=814907
7 <title>Test for Bug
814907</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
14 @media color \
0061ND ( monochrome ) {}
15 @media (max-width:
200px), (color) {}
17 @supports(color: green){}
18 @supports (color: green) {}
19 @supports ((color: green)) {}
20 @supports (color: green) and (color: blue) {}
21 @supports ( Font:
20px serif ! Important) {}
25 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=814907">Mozilla Bug
814907</a>
27 <div id=
"content" style=
"display: none">
31 <script type=
"application/javascript">
33 /** Test for Bug
814907 **/
37 // re-parse the style sheet with the pref turned on
38 var style = document.getElementById(
"style");
39 style.textContent +=
" ";
41 var sheet = style.sheet;
47 "color and (monochrome)",
48 "(max-width: 200px), (color)",
52 "(color: green) and (color: blue)",
53 "( Font: 20px serif ! Important)"
56 is(sheet.cssRules.length, conditions.length);
58 for (var i =
0; i < sheet.cssRules.length; i++) {
59 var rule = sheet.cssRules[i];
60 is(rule.conditionText, conditions[i],
"rule " + i +
" has expected conditionText");
61 if (rule.type == CSSRule.MEDIA_RULE) {
62 is(rule.conditionText, rule.media.mediaText,
"rule " + i +
" conditionText matches media.mediaText");
69 SimpleTest.waitForExplicitFinish();