blob: 36d79f34231a63783b7bb442985db846907f04b5 [file] [log] [blame]
<html>
<head>
<script>
function loaded()
{
document.getElementsByTagName('h4')[0].innerHTML = document.domain;
}
function startTest(event)
{
// A manual click should navigate.
if (window.eventSender) {
var button = document.getElementById("b");
eventSender.mouseMoveTo(button.offsetLeft + event.data.x + 4, button.offsetTop + event.data.y + 4);
eventSender.mouseDown();
eventSender.mouseUp();
}
}
function performTest()
{
// User gestures are propagated through a single setTimeout(), but
// not nested setTimeout()s. Ensure that the user gesture token
// doesn't propagate, but that the navigation goes through anyway,
// because there was a user gesture in this iframe previously.
setTimeout(function() {
setTimeout(function() {
parent.location = "http://localhost:8000/security/frameNavigation/resources/navigation-changed-iframe.html";
}, 0);
}, 0);
}
window.addEventListener("message", startTest, false);
</script>
</head>
<body onload="loaded();">
<h4>DOMAIN</h4>
<button id="b" onclick="performTest();">Perform Test</button>
</body>
</html>