<head>
</head>
<body onload="onload()">
<form action="resources/redirect-target.html#2">
<input type="submit" id="nav-button" value="Navigate">
</form>
<div id="manual-explanation" style="display: none; color: blue">When running this test outside of DRT, please click on the "Navigate" button.</div>
</body>
<script>
if (window.testRunner) {
testRunner.clearBackForwardList();
testRunner.waitUntilDone();
}
if (window.eventSender) {
var navButtonNode = document.getElementById('nav-button');
eventSender.mouseMoveTo(
navButtonNode.offsetLeft + navButtonNode.offsetWidth / 2,
navButtonNode.offsetTop + navButtonNode.offsetHeight / 2);
eventSender.mouseDown();
eventSender.mouseUp();
} else {
document.getElementById('manual-explanation').style.display = '';
}
function onload() {
window.console.log('FAIL: Should not have reached onload before navigating away');
}
</script>