mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 23:35:34 +00:00
Bug 665845 - Fixes to content/html/content/test/test_bug561634.html. r=ehsan
This commit is contained in:
parent
fe1d5828bd
commit
c24399e777
@ -12,8 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=561634
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=561634">Mozilla Bug 561634</a>
|
||||
<p id="display"></p>
|
||||
<!--<div id="content" style="display: none">-->
|
||||
<div id="content">
|
||||
<div id="content" style="display: none;">
|
||||
<form>
|
||||
</form>
|
||||
</div>
|
||||
@ -72,12 +71,6 @@ function checkInvalid()
|
||||
ok(!f.checkValidity(),
|
||||
"A form with at least one invalid element is invalid");
|
||||
|
||||
// Check event is fired
|
||||
i.addEventListener("invalid", function (e) {
|
||||
ok(true, "invalid event should have been fired on invalid elements");
|
||||
SimpleTest.finish();
|
||||
}, false);
|
||||
|
||||
f.removeChild(i2);
|
||||
f.removeChild(i);
|
||||
}
|
||||
@ -107,22 +100,26 @@ function checkInvalidEvent()
|
||||
|
||||
f.checkValidity();
|
||||
|
||||
SimpleTest.executeSoon(function () {
|
||||
setTimeout(function() {
|
||||
ok(invalidEventForInvalidElement,
|
||||
"invalid event should be fired on invalid elements");
|
||||
ok(!invalidEventForValidElement,
|
||||
"invalid event should not be fired on valid elements");
|
||||
});
|
||||
|
||||
f.removeChild(i2);
|
||||
f.removeChild(i);
|
||||
f.removeChild(i2);
|
||||
f.removeChild(i);
|
||||
|
||||
SimpleTest.finish();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
checkEmptyForm();
|
||||
checkBarredFromConstraintValidation();
|
||||
checkValid();
|
||||
checkInvalid();
|
||||
checkInvalidEvent();
|
||||
checkInvalidEvent(); // will call finish().
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
Loading…
Reference in New Issue
Block a user