blob: 1e67c6e78b7d111516406ac2aa8b70a26be22b02 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.setCanOpenWindows();
testRunner.dumpChildFramesAsText();
testRunner.waitUntilDone();
testRunner.setCloseRemainingWindowsWhenComplete()
testRunner.setPopupBlockingEnabled(true);
}
function test()
{
var myLink = document.getElementById('link');
var myFrame = window.frames['otherFrame'];
myLink.onclick = myFrame.handleClick;
if (window.testRunner) {
var x = myLink.offsetLeft + 2;
var y = myLink.offsetTop + 2;
eventSender.mouseMoveTo(x, y);
eventSender.mouseDown();
eventSender.mouseUp();
}
}
function log(msg)
{
var res = document.getElementById('res');
res.innerHTML = res.innerHTML + msg + "<br>";
}
</script>
</head>
<body onload="test()">
This tests that window.open works across frames.<br>
To run manually click the link below.<br>
<a href="resources/greenbox.png" id="link">GreenBox or Success page.</a><br>
<iframe src="resources/open-window-from-another-frame-otherFrame.html" name="otherFrame"></iframe>
<div id="res"></div>
</body>
</html>