| <script src="../../resources/js-test.js"></script> |
| <div id="parentDiv" class="button" onclick="alert('clicked')"> |
| <div id="childDiv" class="icon"></div> |
| description("Tests that the click event is fired at the common ancestor if the mouseDown / mouseUp nodes differ."); |
| parentGotClickEvent = false; |
| childGotClickEvent = false; |
| document.getElementById("parentDiv").onclick = function() { |
| parentGotClickEvent = true; |
| document.getElementById("childDiv").onclick = function() { |
| childGotClickEvent = true; |
| if (window.eventSender) { |
| eventSender.mouseMoveTo(10, 300); |
| shouldBeTrue("parentGotClickEvent"); |
| shouldBeFalse("childGotClickEvent"); |