Bug 951887 followup. Adjust tests to deal with the new reality.

This commit is contained in:
Boris Zbarsky 2014-03-06 00:22:43 -05:00
Родитель 450fef6f62
Коммит a614bdaa4b
2 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -185,8 +185,10 @@ function checkInputRequiredValidity(type)
element.required = true;
SpecialPowers.wrap(element).value = ''; // To make :-moz-ui-valid apply.
checkSufferingFromBeingMissing(element, true);
document.forms[0].removeChild(element);
checkNotSufferingFromBeingMissing(element);
// Removing the child changes nothing about whether it's valid
checkSufferingFromBeingMissing(element, true);
}
function checkInputRequiredValidityForCheckbox()
@ -221,7 +223,7 @@ function checkInputRequiredValidityForCheckbox()
element.required = true;
element.checked = false;
document.forms[0].removeChild(element);
checkNotSufferingFromBeingMissing(element);
checkSufferingFromBeingMissing(element, true);
}
function checkInputRequiredValidityForRadio()
@ -297,7 +299,7 @@ function checkInputRequiredValidityForRadio()
element2.required = true;
element2.checked = false;
document.forms[0].removeChild(element2);
checkNotSufferingFromBeingMissing(element2);
checkSufferingFromBeingMissing(element2, true);
}
function checkInputRequiredValidityForFile()
@ -350,7 +352,7 @@ function checkInputRequiredValidityForFile()
SpecialPowers.wrap(element).value = '';
file.remove(false);
document.forms[0].removeChild(element);
checkNotSufferingFromBeingMissing(element);
checkSufferingFromBeingMissing(element, true);
}
checkTextareaRequiredValidity();

Просмотреть файл

@ -129,7 +129,7 @@ function checkRadios(r1, r2, r3, form)
var p = r2.parentNode;
p.removeChild(r2);
checkPseudoClasses(r1, true, true, false);
checkPseudoClasses(r2, true, true, false);
checkPseudoClasses(r2, false, false, true);
p.appendChild(r2);
checkPseudoClasses(r1, false, false, true);