blob: 0a79f1497956fd6719e4ebada30c574c19f32afb [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
var clicked = false;
function handleClicked()
{
clicked = true;
}
function test()
{
description("This test passes if it doesn't crash and the context menu is shown for the search input");
if (!window.eventSender)
return;
var target = document.getElementById("target");
var clickX = target.offsetLeft + target.offsetWidth - 2;
var clickY = target.offsetTop + target.offsetHeight / 2;
eventSender.mouseMoveTo(clickX, clickY);
eventSender.contextClick();
shouldBe("clicked", "true");
}
</script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<input id="target" type="search" oncontextmenu="handleClicked()">
<script>test();</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>