Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / property-access-on-cached-window-after-frame-removed.html
blob5433dc5452cb23446da440db51b495fe5d7d5fd9
1 <html>
2 <head>
3 <script src="../../../resources/js-test.js"></script>
4 <script src="resources/window-property-collector.js"></script>
5 <script>
6 var childWindow;
7 var propertiesToVerify = [];
9 function insertExpectedResult(path, expected)
11 var propertyPath = path.join('.');
12 propertiesToVerify.push({'property': "childWindow." + propertyPath, 'expected': expected});
15 function runTest()
17 description("Tests property access on a cached DOMWindow after the associated frame is no longer in a web page. Test should not crash and properties should be set to sane defaults.");
18 var frame = document.getElementById("frame");
19 childWindow = frame.contentWindow;
20 // Have expected results assume that the frame has been closed (=> window.closed = true.)
21 collectProperties(true);
22 frame.parentNode.removeChild(frame);
23 for (var i = 0; i < propertiesToVerify.length; ++i)
24 shouldBe(propertiesToVerify[i].property, propertiesToVerify[i].expected);
26 </script>
27 </head>
28 <body>
29 <iframe id="frame" src="about:blank" onload="runTest()"></iframe>
30 </body>
31 </html>