blob: 98aba2f0aefebc88006c550fdde0274d73886761 [file] [log] [blame]
<html>
<body>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.dumpChildFramesAsText();
testRunner.setDumpConsoleMessages(false);
testRunner.waitUntilDone();
}
// Ensure a user gesture happened in the main frame, but not in the iframe.
if (window.eventSender) {
eventSender.mouseMoveTo(0, 0);
eventSender.mouseDown(0, 0);
eventSender.mouseUp(0, 0);
}
window.addEventListener("message", e => {
if (e.data == "PASS")
setTimeout(_ => { testRunner.notifyDone(); }, 500); // Give the schedule blocking navigation time to fire.
else
testRunner.testFailed("'top.location' didn't throw.");
});
</script>
<iframe src="http://localhost:8000/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html"></iframe>
</body>
</html>