Bug 1148405 - Intermittent Mulet test_garbage_at_end_of_declarations.html,test_value_storage.html. r=smaug, a=test-only
--- a/layout/style/test/test_garbage_at_end_of_declarations.html
+++ b/layout/style/test/test_garbage_at_end_of_declarations.html
@@ -31,16 +31,17 @@
* ensures that we don't accept garbage.
*
* Despite that, I'm checking it in anyway, since it caught an infinite
* loop in the patch for bug 435441.
*/
var gElement = document.getElementById("testnode");
var gDeclaration = gElement.style;
+var gUnsetValueEnabled = SpecialPowers.getBoolPref("layout.css.unset-value.enabled");
/*
* This lists properties where garbage identifiers are allowed at the
* end, with values in property_database.js that are exceptions that
* should be tested anyway. "inherit", "initial" and "unset" are always
* tested.
*/
var gAllowsExtra = {
@@ -114,17 +115,17 @@ function test_property(property)
["expected garbage ignored after '", property, ": ", value,
"'"].join(""));
}
}
var idx;
test_value("inherit");
test_value("initial");
- if (SpecialPowers.getBoolPref("layout.css.unset-value.enabled"))
+ if (gUnsetValueEnabled)
test_value("unset");
for (idx in info.initial_values)
test_value(info.initial_values[idx]);
for (idx in info.other_values)
test_value(info.other_values[idx]);
}
// To avoid triggering the slow script dialog, we have to test one
--- a/layout/style/test/test_value_storage.html
+++ b/layout/style/test/test_value_storage.html
@@ -88,17 +88,16 @@ var gElement = document.getElementById("
var gDeclaration = gElement.style;
var gComputedStyle = window.getComputedStyle(gElement, "");
var gPrereqDeclaration =
document.getElementById("prereqsheet").sheet.cssRules[0].style;
function test_property(property)
{
- ok(SpecialPowers.getBoolPref("layout.css.variables.enabled"), "pref not set #2");
var info = gCSSProperties[property];
var test_computed = !("backend_only" in info);
// can all properties be removed from the style?
function test_remove_all_properties(property, value) {
var i, p = [];
for (i = 0; i < gDeclaration.length; i++) p.push(gDeclaration[i]);