1 <p>This test verifies that a button that receives a mouse down event does not receive
2 a corresponding mouse up event when the mouse up happens outside the button.
4 <p>If the test passes, you'll see a PASS message below.
7 <p>To run this test in Safari:
9 <li>Mouse down inside the button.
</li>
10 <li>Move the mouse outside the button.
</li>
15 <input type=
"button" value=
"button!" id=
"button">
16 <pre id=
"log">PASS: mouse up event did not fire
</pre>
21 document
.getElementById('button').addEventListener("mouseup", button_mouseUp
, false);
23 if (window
.testRunner
)
24 testRunner
.dumpAsText();
26 if (window
.eventSender
) {
27 eventSender
.mouseMoveTo(40, 20); // in button
28 eventSender
.mouseDown();
29 eventSender
.mouseMoveTo(40, 200); // outside button
30 eventSender
.mouseUp();
34 function button_mouseUp()
36 document
.getElementById('log').innerHTML
= "FAIL: mouseup event fired\n";