blob: fb64911fae272a91b0daaccfa714da44a1a7026e [file] [log] [blame]
mjs06cc29f2005-10-04 04:08:04 +00001<p>This test checks whether event.stopPropagation() prevents the
2default action. It should not! If the default was prevented, you'll
3see a link below and the text FAIL. On success you will see PASS. The
4test should say PASS 4 times.
5
6</p>
7<input type="checkbox" id="checkbox1" onclick="event.stopPropagation()" value="click here">
8<input type="checkbox" id="checkbox2" onclick="event.preventDefault()" value="click here">
9<p>
10
11<script>
rniwa@webkit.orgada3c202012-06-20 03:28:42 +000012if (window.testRunner)
13 testRunner.dumpAsText();
mjs06cc29f2005-10-04 04:08:04 +000014
15var checkbox1 = document.getElementById("checkbox1");
16checkbox1.click();
17var checkbox2 = document.getElementById("checkbox2");
18checkbox2.click();
19
20document.write(checkbox1.checked ? "PASS<br>" : "FAIL<br>");
21document.write(checkbox2.checked ? "FAIL<br>" : "PASS<br>");
22
23</script>