Index: third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-parent-navigation.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-parent-navigation.html b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-parent-navigation.html |
index df20f413dd5ebe49c779ff242cdeaceef4b5b39b..aaff6f66f4509ef4e535fe1ad3c183dc848a14fc 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-parent-navigation.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-parent-navigation.html |
@@ -4,19 +4,29 @@ |
function loaded() |
{ |
document.getElementsByTagName('h4')[0].innerHTML = document.domain; |
- // Allow the user to click the button during manuel runs. |
- if (window.testRunner) |
- performTest(); |
+ } |
+ |
+ function startTest(event) |
+ { |
+ // A manual click should navigate. |
+ if (window.eventSender) { |
+ var button = document.getElementById("b"); |
+ eventSender.mouseMoveTo(button.offsetLeft + event.data.x + 2, button.offsetTop + event.data.y + 2); |
+ eventSender.mouseDown(); |
+ eventSender.mouseUp(); |
+ } |
} |
function performTest() |
{ |
parent.location = "http://localhost:8000/security/frameNavigation/resources/navigation-changed-iframe.html"; |
} |
+ |
+ window.addEventListener("message", startTest, false); |
</script> |
</head> |
<body onload="loaded();"> |
<h4>DOMAIN</h4> |
- <button onclick="performTest();">Perform Test</button> |
+ <button id="b" onclick="performTest();">Perform Test</button> |
</body> |
</html> |