Bug 814310 - Force pref on for @supports reftests and skip mochitest if pref not set. r=bz

This commit is contained in:
Cameron McCormack 2012-10-06 11:17:02 +10:00
parent 1e73c2b149
commit e0dd98534c
4 changed files with 75 additions and 71 deletions

View File

@ -21,36 +21,36 @@
== css3-namespace/syntax-013.xml css3-namespace/ref-lime-5.xml
== css3-namespace/syntax-014.xml css3-namespace/ref-lime-3.xml
== css3-namespace/syntax-015.xml css3-namespace/ref-lime-1.xml
== css3-conditional/at-supports-001.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-002.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-003.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-004.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-005.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-006.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-007.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-008.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-009.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-010.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-011.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-012.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-013.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-014.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-015.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-016.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-017.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-018.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-019.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-020.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-021.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-022.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-023.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-024.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-025.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-026.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-027.html css3-conditional/at-supports-027-ref.html
== css3-conditional/at-supports-028.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-029.html css3-conditional/at-supports-027-ref.html
== css3-conditional/at-supports-030.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-031.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-032.html css3-conditional/at-supports-001-ref.html
== css3-conditional/at-supports-033.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-001.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-002.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-003.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-004.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-005.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-006.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-007.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-008.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-009.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-010.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-011.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-012.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-013.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-014.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-015.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-016.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-017.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-018.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-019.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-020.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-021.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-022.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-023.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-024.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-025.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-026.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-027.html css3-conditional/at-supports-027-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-028.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-029.html css3-conditional/at-supports-027-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-030.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-031.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-032.html css3-conditional/at-supports-001-ref.html
pref(layout.css.supports-rule.enabled,true) == css3-conditional/at-supports-033.html css3-conditional/at-supports-001-ref.html

View File

@ -1,31 +1,31 @@
== css-supports-001.xht support/pass.xht
== css-supports-002.xht support/pass.xht
== css-supports-003.xht support/pass.xht
== css-supports-004.xht support/pass.xht
== css-supports-005.xht support/pass.xht
== css-supports-006.xht support/pass.xht
== css-supports-007.xht support/pass.xht
== css-supports-008.xht support/pass.xht
== css-supports-009.xht support/pass.xht
== css-supports-010.xht support/pass.xht
== css-supports-011.xht support/pass.xht
== css-supports-012.xht support/pass.xht
== css-supports-013.xht support/pass.xht
== css-supports-014.xht support/pass.xht
== css-supports-015.xht support/pass.xht
== css-supports-016.xht support/pass.xht
== css-supports-017.xht support/pass.xht
== css-supports-018.xht support/pass.xht
== css-supports-019.xht support/pass.xht
== css-supports-020.xht support/pass.xht
== css-supports-021.xht support/pass.xht
== css-supports-022.xht support/pass.xht
== css-supports-023.xht support/pass.xht
== css-supports-024.xht support/pass.xht
== css-supports-025.xht support/pass.xht
== css-supports-026.xht support/pass.xht
== css-supports-027.xht support/pass.xht
== css-supports-028.xht support/pass.xht
== css-supports-029.xht support/pass.xht
== css-supports-030.xht support/pass.xht
== css-supports-031.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-001.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-002.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-003.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-004.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-005.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-006.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-007.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-008.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-009.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-010.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-011.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-012.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-013.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-014.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-015.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-016.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-017.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-018.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-019.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-020.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-021.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-022.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-023.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-024.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-025.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-026.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-027.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-028.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-029.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-030.xht support/pass.xht
pref(layout.css.supports-rule.enabled,true) == css-supports-031.xht support/pass.xht

View File

@ -17,7 +17,7 @@ include css21/reftest.list
# include background3/reftest.list
# Conditional Rules Level 3
skip-if(!prefs.getBoolPref("layout.css.supports-rule.enabled")) include conditional3/reftest.list
include conditional3/reftest.list
# Fonts Level 3
# include fonts3/reftest.list

View File

@ -30,13 +30,17 @@ function condition(s) {
return s.replace(/^@supports\s*/, '').replace(/ \s*{\s*}\s*$/, '');
}
var sheet = document.getElementById("style").sheet;
if (!SpecialPowers.getBoolPref("layout.css.supports-rule.enabled")) {
todo(false, "skipping test because pref is disabled");
} else {
var sheet = document.getElementById("style").sheet;
is(condition(sheet.cssRules[0].cssText), "(color: green)");
is(condition(sheet.cssRules[1].cssText), "(color: green)");
is(condition(sheet.cssRules[2].cssText), "((color: green))");
is(condition(sheet.cssRules[3].cssText), "(color: green) and (color: blue)");
is(condition(sheet.cssRules[4].cssText), "( Font: 20px serif ! Important)");
is(condition(sheet.cssRules[0].cssText), "(color: green)");
is(condition(sheet.cssRules[1].cssText), "(color: green)");
is(condition(sheet.cssRules[2].cssText), "((color: green))");
is(condition(sheet.cssRules[3].cssText), "(color: green) and (color: blue)");
is(condition(sheet.cssRules[4].cssText), "( Font: 20px serif ! Important)");
}
</script>
</pre>
</body>