20 lines
633 B
HTML
20 lines
633 B
HTML
<html>
|
|
<body>
|
|
<div id="box" onmousedown="document.getElementById('result').appendChild(document.createTextNode('PASS'));" style="border:1px dotted red">This tests to make sure that right clicking also sends a onmousedown event.</div>
|
|
<p id='result'></p>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
<script>
|
|
if (window.testRunner) {
|
|
var box, x, y;
|
|
box = document.getElementById("box");
|
|
x = box.offsetParent.offsetLeft + box.offsetLeft + box.offsetWidth / 2;
|
|
y = box.offsetParent.offsetTop + box.offsetTop + box.offsetHeight / 2;
|
|
eventSender.mouseMoveTo(x, y);
|
|
eventSender.contextClick();
|
|
testRunner.dumpAsText();
|
|
}
|
|
|
|
</script> |