Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / open-window-from-another-frame.html
blob1e67c6e78b7d111516406ac2aa8b70a26be22b02
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.setCanOpenWindows();
7 testRunner.dumpChildFramesAsText();
8 testRunner.waitUntilDone();
9 testRunner.setCloseRemainingWindowsWhenComplete()
10 testRunner.setPopupBlockingEnabled(true);
13 function test()
15 var myLink = document.getElementById('link');
16 var myFrame = window.frames['otherFrame'];
17 myLink.onclick = myFrame.handleClick;
18 if (window.testRunner) {
19 var x = myLink.offsetLeft + 2;
20 var y = myLink.offsetTop + 2;
21 eventSender.mouseMoveTo(x, y);
22 eventSender.mouseDown();
23 eventSender.mouseUp();
27 function log(msg)
29 var res = document.getElementById('res');
30 res.innerHTML = res.innerHTML + msg + "<br>";
32 </script>
33 </head>
34 <body onload="test()">
35 This tests that window.open works across frames.<br>
36 To run manually click the link below.<br>
37 <a href="resources/greenbox.png" id="link">GreenBox or Success page.</a><br>
38 <iframe src="resources/open-window-from-another-frame-otherFrame.html" name="otherFrame"></iframe>
39 <div id="res"></div>
40 </body>
41 </html>