3 <script src=
"../../../resources/js-test.js"></script>
4 <script src=
"resources/window-property-collector.js"></script>
7 var propertiesToVerify
= [];
9 function insertExpectedResult(path
, expected
)
11 var propertyPath
= path
.join('.');
12 propertiesToVerify
.push({'property': "childWindow." + propertyPath
, 'expected': expected
});
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
);
29 <iframe id=
"frame" src=
"about:blank" onload=
"runTest()"></iframe>