Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / iframe_notifications / iframe-reparenting-close-window-child.html
blob7758115dc4dee662c1694cb2c5f062002d1f13b2
1 <html>
2 <script>
4 var iframe;
6 window.addAndTransferIframe = function()
8 iframe = document.createElement('iframe');
9 iframe.setAttribute('width', '500');
10 iframe.setAttribute('height', '350');
11 iframe.setAttribute('src', 'iframe-reparenting-close-window-iframe.html');
12 window.document.body.appendChild(iframe);
15 // Called from Iframe when it is loaded and initialized.
16 window.transferIframe = function()
18 var backgroundWin = window.opener;
19 backgroundWin.log("Transferring Iframe now.");
20 backgroundWin.document.adoptNode(iframe);
21 backgroundWin.document.body.appendChild(iframe);
22 iframe.contentWindow.finish();
23 window.close();
25 </script>
27 <body>
28 </body>
29 </html>