blob: 0da42d1b9ea703abee559744a55045bd599a9ef1 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../../resources/js-test-pre.js"></script>
</head>
<body onload="test()">
<p>This test checks that the context menu is shown on a two finger tap gesture.</p>
<div id="text">Testing</div>
<div id="result">FAIL</div>
<script>
function test()
{
if (window.testRunner)
testRunner.dumpAsText();
document.oncontextmenu = function() { document.getElementById("result").innerHTML = "PASS"; }
var text = document.getElementById("text");
var x = text.offsetParent.offsetLeft + text.offsetLeft + 4;
var y = text.offsetParent.offsetTop + text.offsetTop + text.offsetHeight / 2;
if (!window.eventSender)
return;
if (eventSender.gestureTwoFingerTap) {
eventSender.gestureTwoFingerTap(x, y);
} else {
debug("gestureTwoFingerTap not implemented by this platform");
return;
}
}
</script>
</body>
</html>