Index: LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced.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-and-gced.html |
similarity index 74% |
copy from LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed.html |
copy to LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced.html |
index 65e1979727577f7de251906a0a3c3177e23f308c..e89c4628383cb99003a0628b53d11b3202e087c1 100644 |
--- 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-and-gced.html |
@@ -3,6 +3,8 @@ |
<script src="../../../resources/js-test.js"></script> |
<script src="resources/window-property-collector.js"></script> |
<script> |
+var jsTestIsAsync = true; |
+ |
var childWindow; |
var propertiesToVerify = []; |
@@ -14,13 +16,21 @@ function insertExpectedResult(path, 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."); |
+ description("Tests property access on a cached DOMWindow after the associated frame is removed from a web page and garbage collected. 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); |
+ window.setTimeout(verifyResults, 0); |
+} |
+ |
+function verifyResults() |
+{ |
+ if (window.gc) |
+ gc(); |
for (var i = 0; i < propertiesToVerify.length; ++i) |
shouldBe(propertiesToVerify[i].property, propertiesToVerify[i].expected); |
+ finishJSTest(); |
} |
</script> |
</head> |