A Document / Window should lose its browsing context as soon as its iframe is removed...
[WebKit-https.git] / LayoutTests / fast / dom / Window / resources / dom-access-from-closure-iframe-child.html
1 <script>
2     const parent = window.parent; // Save parent as the window will be detached when accessFrame() is called.
3
4     parent.accessFrame = function()
5     {
6         function normalizeURL(url)
7         {
8             return url.substring(url.lastIndexOf("LayoutTests"));
9         }
10
11         try {
12             parent.log("document.URL: " + normalizeURL(document.URL));
13             parent.log("window.document.URL: " + normalizeURL(window.document.URL));
14             parent.log("name: " + name);
15             parent.log("window.name: " + window.name);
16         } catch (e) {
17             parent.log("An exception was thrown: " + e.message);
18         }
19     }
20
21     window.location = "notify-parent-done.html";
22 </script>