blob: 5c44babd6b0d75bb4930a408f843df933641729e [file] [log] [blame]
<html>
<body>
<div id="box" onclick="document.getElementById('result').innerHTML = 'FAIL';" style="border:1px dotted red">This tests to make sure that a control click does not result in a click event on the Mac.</div>
<p id='result'>PASS</p>
</body>
</html>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
var isMacOSX = navigator.userAgent.indexOf("Mac OS X") != -1;
if (isMacOSX) {
var box = document.getElementById("box");
var x = box.offsetParent.offsetLeft + box.offsetLeft + box.offsetWidth / 2;
var y = box.offsetParent.offsetTop + box.offsetTop + box.offsetHeight / 2;
eventSender.dragMode = false;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown(0, ['ctrlKey']);
eventSender.mouseUp(0, ['ctrlKey']);
}
}
</script>