4 <script src=
"../../resources/js-test.js"></script>
21 <iframe class=
"start" src=
"about:blank"></iframe>
22 <button id=
"test">Click Here
</button>
23 <div id=
"console"></div>
26 function clickHandler1()
28 win
= window
.open("about:blank");
29 shouldBeNonNull("win");
31 document
.querySelector("iframe").setAttribute("class", "");
34 function clickHandler2()
36 win
= window
.open("about:blank");
37 shouldBeUndefined("win");
40 document
.querySelector("#test").addEventListener("mousedown", clickHandler1
);
41 document
.querySelector("iframe").contentDocument
.body
.addEventListener("mouseup", clickHandler2
);
44 if (window
.testRunner
) {
45 testRunner
.dumpAsText();
46 testRunner
.setCanOpenWindows();
47 testRunner
.setPopupBlockingEnabled(true);
48 testRunner
.setCloseRemainingWindowsWhenComplete(true);
50 var button
= document
.querySelector("#test");
52 eventSender
.mouseMoveTo(button
.offsetLeft
+ button
.offsetWidth
/ 2, button
.offsetTop
+ button
.offsetHeight
/ 2);
53 eventSender
.mouseDown();
54 eventSender
.mouseUp();