Index: LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed.html |
diff --git a/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed.html b/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..65e1979727577f7de251906a0a3c3177e23f308c |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed.html |
@@ -0,0 +1,30 @@ |
+<html> |
+<head> |
+<script src="../../../resources/js-test.js"></script> |
+<script src="resources/window-property-collector.js"></script> |
+<script> |
+var childWindow; |
+var propertiesToVerify = []; |
+ |
+function insertExpectedResult(path, expected) |
+{ |
+ var propertyPath = path.join('.'); |
+ propertiesToVerify.push({'property': "childWindow." + propertyPath, 'expected': expected}); |
+} |
+ |
+function runTest() |
+{ |
+ 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."); |
+ var frame = document.getElementById("frame"); |
+ childWindow = frame.contentWindow; |
+ collectProperties(); |
+ frame.parentNode.removeChild(frame); |
+ for (var i = 0; i < propertiesToVerify.length; ++i) |
+ shouldBe(propertiesToVerify[i].property, propertiesToVerify[i].expected); |
+} |
+</script> |
+</head> |
+<body> |
+<iframe id="frame" src="about:blank" onload="runTest()"></iframe> |
+</body> |
+</html> |