3 <script src="../../../resources/js-test.js"></script>
4 <script src="resources/window-property-collector.js"></script>
6 var jsTestIsAsync = true;
10 var propertiesToVerify = [];
12 function insertExpectedResult(path, expected)
14 var propertyPath = path.join('.');
15 propertiesToVerify.push({'property': "oldChildWindow." + propertyPath, 'expected': "newChildWindow." + propertyPath});
20 var frame = document.getElementById("frame");
21 if (frame.src != 'about:blank') {
22 description("Tests property access on a cached DOMWindow after the associated frame is navigated. Test should not crash and properties read from the cached DOMWindow should be identical to properties through the 'current' DOMWindow.");
23 oldChildWindow = frame.contentWindow;
24 // Have expected results assume that the frame hasn't been closed (=> window.closed = false.)
25 collectProperties(false);
26 frame.src = 'about:blank';
29 newChildWindow = frame.contentWindow;
30 for (var i = 0; i < propertiesToVerify.length; ++i)
31 shouldBe(propertiesToVerify[i].property, propertiesToVerify[i].expected);
37 <iframe id="frame" src="resources/blank.html" onload="runTest()"></iframe>