Bug 839866 - Set the dom.experimental_forms pref for all tests, not just a few select tests. r=mounir.

--HG--
extra : rebase_source : ed22c6b00a3b3fd74916310eb17e267a3c5ba135
This commit is contained in:
Jonathan Watt 2013-02-11 23:14:35 +00:00
parent 1f77b14c31
commit 2664a97006
15 changed files with 2 additions and 73 deletions

View File

@ -442,6 +442,7 @@ user_pref("browser.startup.page", 0); // use about:blank, not browser.startup.ho
user_pref("browser.ui.layout.tablet", 0); // force tablet UI off
user_pref("dom.allow_scripts_to_close_windows", true);
user_pref("dom.disable_open_during_load", false);
user_pref("dom.experimental_forms", true); // on for testing
user_pref("dom.max_script_run_time", 0); // no slow script dialogs
user_pref("hangmonitor.timeout", 0); // no hang monitor
user_pref("dom.max_chrome_script_run_time", 0);

View File

@ -17,8 +17,6 @@
// TODO: maybe make those reflections be tested against all input types.
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
// .accept
reflectString({
element: document.createElement("input"),
@ -246,9 +244,6 @@ reflectUnsignedInt({
// .validationMessage doesn't reflect a content attribute.
// .labels doesn't reflect a content attribute.
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -308,8 +308,6 @@ function checkSanitizing(element)
}
}
var pref = SpecialPowers.getBoolPref("dom.experimental_forms");
SpecialPowers.setBoolPref("dom.experimental_forms", true);
for (type of inputTypes) {
var form = document.forms[0];
var element = document.createElement("input");
@ -345,8 +343,6 @@ for (type of todoTypes) {
form.removeChild(element);
}
SpecialPowers.setBoolPref("dom.experimental_forms", pref);
</script>
</pre>
</body>

View File

@ -213,11 +213,7 @@ function runTest()
var testRunner = runTest();
addLoadEvent(function () {
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]},
function() {
testRunner.next();
}
);
testRunner.next();
});
</script>

View File

@ -77,8 +77,6 @@ function checkValidity(aElement, aValidity, aApply, aRangeApply)
}
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
for (var test of data) {
input.type = test.type;
var apply = test.apply;
@ -288,9 +286,6 @@ for (var test of data) {
input.value = '';
}
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -77,8 +77,6 @@ function checkValidity(aElement, aValidity, aApply, aRangeApply)
}
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
for (var test of data) {
input.type = test.type;
var apply = test.apply;
@ -294,9 +292,6 @@ for (var test of data) {
input.value = '';
}
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -102,8 +102,6 @@ function checkMozIsTextFieldValueTodo(aInput, aResult)
"mozIsTextField(true) should return " + aResult);
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
// Check if the method is defined for the correct elements.
for (data of gElementTestData) {
checkMozIsTextFieldDefined(data[0], data[1]);
@ -122,9 +120,6 @@ for (data of gInputTodoData) {
checkMozIsTextFieldValueTodo(input, data[1]);
}
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -265,8 +265,6 @@ var invalidTypes = Array('checkbox', 'radio', 'file', 'number', 'date', 'time');
// TODO: 'datetime', 'month', 'week', 'datetime-local', 'range' and 'color'
// do not accept the @pattern too but are not implemented yet.
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
for (type of validTypes) {
input.type = type;
completeValidityCheck(input, false);
@ -283,9 +281,6 @@ for (type of invalidTypes) {
completeValidityCheck(input, true);
}
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -356,9 +356,6 @@ function checkInputRequiredValidityForFile()
checkNotSufferingFromBeingMissing(element);
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
checkTextareaRequiredValidity();
// The require attribute behavior depend of the input type.
@ -390,9 +387,6 @@ checkInputRequiredValidityForCheckbox();
checkInputRequiredValidityForRadio();
checkInputRequiredValidityForFile();
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -83,8 +83,6 @@ function checkValidity(aElement, aValidity, aApply, aData)
(aElement.wil && aValidity) ? ":invalid shouldn't apply" : "valid should apply");
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
for (var test of data) {
var input = getFreshElement(test.type);
var apply = test.apply;
@ -523,9 +521,6 @@ for (var test of data) {
}
}
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -601,18 +601,12 @@ function checkStepUp()
}
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
checkPresence();
checkAvailability();
checkStepDown();
checkStepUp();
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -285,8 +285,6 @@ function checkValidityStateObjectAliveWithoutElement(element)
ok(v.valid, "When the element is not alive, it should be valid");
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
checkConstraintValidationAPIExist(document.getElementById('f'));
checkConstraintValidationAPIExist(document.getElementById('i'));
checkConstraintValidationAPIExist(document.getElementById('b'));
@ -341,9 +339,6 @@ checkValidityStateObjectAliveWithoutElement("textarea");
checkValidityStateObjectAliveWithoutElement("output");
checkValidityStateObjectAliveWithoutElement("object");
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -372,9 +372,6 @@ function checkWithBustedPrototype()
}
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
checkAvailability();
checkGarbageValues();
checkWithBustedPrototype();
@ -387,9 +384,6 @@ checkDateSet();
checkTimeGet();
checkTimeSet();
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -396,8 +396,6 @@ function checkTimeSet()
}
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
checkAvailability();
// <input type='number'> test
@ -412,9 +410,6 @@ checkDateSet();
checkTimeGet();
checkTimeSet();
SimpleTest.finish();
});
</script>
</pre>
</body>

View File

@ -46,9 +46,6 @@ var todoTypes = [
var nonTrivialSanitizing = [ 'number', 'date', 'time' ];
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({'set': [["dom.experimental_forms", true]]}, function() {
var length = testData.length;
for (var i=0; i<length; ++i) {
for (var j=0; j<length; ++j) {
@ -101,9 +98,6 @@ for (var type of todoTypes) {
todo_is(e.type, type, type + " type isn't supported yet");
}
SimpleTest.finish();
});
</script>
</pre>
</body>