Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Unified Diff: LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced.html

Issue 203053002: Add null check for frame when creating WebCore::Performance. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add rebaseline expectations Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced.html
diff --git a/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed.html b/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced.html
similarity index 78%
copy from LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed.html
copy to LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced.html
index ca82951736706a16a85f083f2ed2ce97d7d424b5..45490b58dabeb1c25957597e892419db62f74790 100644
--- a/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed.html
+++ b/LayoutTests/fast/dom/Window/property-access-on-cached-properties-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 = [];
@@ -21,13 +23,21 @@ function insertExpectedResult(path, expected)
function runTest()
{
- description("Tests access of cached DOMWindow properties 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 access of cached DOMWindow properties 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>

Powered by Google App Engine
This is Rietveld 408576698