| <script src="../../resources/js-test-pre.js"></script> |
| <button id="test" onclick="clickHandler()">Click Here</button> |
| stolenEvent = window.event; |
| win = window.open("about:blank", "blank"); |
| window.event = stolenEvent; |
| win = window.open("about:blank", "blank"); |
| clickHandler = clickHandler1; |
| testRunner.setCanOpenWindows(); |
| testRunner.setPopupBlockingEnabled(true); |
| testRunner.setCloseRemainingWindowsWhenComplete(true); |
| testRunner.waitUntilDone(); |
| var button = document.getElementById("test"); |
| if (window.eventSender) { |
| eventSender.mouseMoveTo(button.offsetLeft + button.offsetWidth / 2, button.offsetTop + button.offsetHeight / 2); |
| clickHandler = clickHandler2; |
| window.event = stolenEvent; |