blob: e0492338ebaf2629d9797dfd96e23fe983af87a5 [file] [log] [blame]
<p>This test verifies that a document that receives a mouse down event receives
a corresponding mouse up event when the mouse up happens outside the window.
</p>
<p>If the test passes, you'll see a PASS message below.
</p>
<p>To run this test in Safari:
<ol>
<li>Mouse down inside the document.</li>
<li>Move the mouse outside the window.</li>
<li>Mouse up.</li>
</ol>
</p>
<hr>
<pre id="log">FAIL: mouse up event did not fire</pre>
<script>
function main()
{
document.addEventListener("mouseup", document_mouseUp, false);
if (window.layoutTestController)
layoutTestController.dumpAsText();
if (window.eventSender) {
eventSender.mouseMoveTo(20, 20); // in window
eventSender.mouseDown();
eventSender.mouseMoveTo(4000, 215); // outside window
eventSender.mouseUp();
}
}
function document_mouseUp()
{
document.getElementById('log').innerHTML = "PASS: mouseup event fired\n";
}
main();
</script>