Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / ManualTests / iframe_notifications / iframe-reparenting-close-window-iframe.html
blob219a2b4eda885abd680c63e88a62e821a17e9115
1 <html>
2 <head>
3 <script>
4 var logWin = window.parent.opener;
5 logWin.log('Initializing Iframe');
7 function test() {
8 logWin.log("Before transfer: permission returned (should be denied): " + Notification.permission);
9 setTimeout("window.parent.transferIframe();", 5000); // Wait long enough for Chrome popup blocker to release the window so it can actually close.
12 function testAfterClose()
14 logWin.log("After transfer: permission returned (should be granted): " + Notification.permission);
16 window.finish = function() {
17 logWin.log("After transfer, the permission call is accessing a destroyed object and can return invalid value or crash, depending on circumstances.");
18 setInterval(testAfterClose, 1000); // Do it several times in a row, it'll crash after 1-3 times
20 </script>
21 </head>
22 <body onload=test()>
23 </body>
24 </html>