<!doctype html>
<script>
function test()
{
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpNavigationPolicy();
testRunner.waitUntilDone();
var isMac = navigator.userAgent.search(/\bMac OS X\b/) != -1;
var submit = document.querySelector("#submit");
eventSender.mouseMoveTo(submit.offsetLeft + 10, submit.offsetTop + 10);
eventSender.mouseDown(0, [isMac ? 'metaKey' : 'ctrlKey']);
eventSender.mouseUp(0, [isMac ? 'metaKey' : 'ctrlKey']);
}
}
</script>
<body onload="test()">
<p>Tests that ctrl-clicking on a submit button results in a new background tab.</p>
<form action="resources/notify-done.html">
<input type="text" name="foo" value="bar" />
<input type="submit" id="submit" />
</form>
</body>