| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../resources/js-test.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 var childWindow; | 5 var childWindow; |
| 6 var propertiesToVerify = []; | 6 var propertiesToVerify = []; |
| 7 | 7 |
| 8 function runTest() | 8 function runTest() |
| 9 { | 9 { |
| 10 description("Tests that getting and setting name and opener on a cached DOMW
indow after the associated frame is removed from a web page does not crash."); | 10 description("Tests that getting and setting name and opener on a cached DOMW
indow after the associated frame is removed from a web page does not crash."); |
| 11 var frame = document.getElementById("frame"); | 11 var frame = document.getElementById("frame"); |
| 12 childWindow = frame.contentWindow; | 12 childWindow = frame.contentWindow; |
| 13 childWindow.name = "oldname"; | 13 childWindow.name = "oldname"; |
| 14 shouldBe("childWindow.name", "'oldname'"); | 14 shouldBe("childWindow.name", "'oldname'"); |
| 15 frame.parentNode.removeChild(frame); | 15 frame.parentNode.removeChild(frame); |
| 16 childWindow.opener = null; | 16 childWindow.opener = null; |
| 17 shouldBeNull("childWindow.opener"); | 17 shouldBeNull("childWindow.opener"); |
| 18 childWindow.name = "newname"; | 18 childWindow.name = "newname"; |
| 19 shouldBe("childWindow.name", "''"); | 19 shouldBe("childWindow.name", "''"); |
| 20 } | 20 } |
| 21 </script> | 21 </script> |
| 22 </head> | 22 </head> |
| 23 <body> | 23 <body> |
| 24 <iframe id="frame" src="about:blank" onload="runTest()"></iframe> | 24 <iframe id="frame" src="about:blank" onload="runTest()"></iframe> |
| 25 </body> | 25 </body> |
| 26 </html> | 26 </html> |
| OLD | NEW |