Commit e36b765b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml/tests: Added more IDOMEvent::preventDefault tests.

parent 39766bcd
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment