mshtml/tests: Added more IDOMEvent::preventDefault tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
39766bcded
commit
e36b765be4
|
@ -358,6 +358,7 @@ function test_prevent_default() {
|
|||
|
||||
elem.onclick = function(event) {
|
||||
event.preventDefault();
|
||||
ok(event.defaultPrevented === false, "defaultPrevented");
|
||||
}
|
||||
e = document.createEvent("Event");
|
||||
e.initEvent("click", true, false);
|
||||
|
@ -372,6 +373,19 @@ function test_prevent_default() {
|
|||
r = elem.dispatchEvent(e);
|
||||
ok(r === true, "dispatchEvent returned " + r);
|
||||
|
||||
e = document.createEvent("Event");
|
||||
e.initEvent("click", false, true);
|
||||
e.preventDefault();
|
||||
ok(e.defaultPrevented === false, "defaultPrevented = " + e.defaultPrevented);
|
||||
|
||||
e = document.createEvent("Event");
|
||||
e.initEvent("click", false, true);
|
||||
elem.onclick = null;
|
||||
r = elem.dispatchEvent(e);
|
||||
ok(r === true, "dispatchEvent returned " + r);
|
||||
e.preventDefault();
|
||||
ok(e.defaultPrevented === false, "defaultPrevented = " + e.defaultPrevented);
|
||||
|
||||
next_test();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue