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

Unified Diff: LayoutTests/fast/dom/NodeIterator/NodeIterator-gc-without-context-crash.html

Issue 26792002: Reland: Reland: Implement new Blink IDL attribute [SetReference] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 2 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/NodeIterator/NodeIterator-gc-without-context-crash.html
diff --git a/LayoutTests/fast/dom/NodeIterator/NodeIterator-dont-overcollect.html b/LayoutTests/fast/dom/NodeIterator/NodeIterator-gc-without-context-crash.html
similarity index 66%
copy from LayoutTests/fast/dom/NodeIterator/NodeIterator-dont-overcollect.html
copy to LayoutTests/fast/dom/NodeIterator/NodeIterator-gc-without-context-crash.html
index c3a1cb82aecb20f75abd700a5d5530ddb209cd1e..c5d07bb9af2f2f4fc40beb1ad174919192f012dd 100644
--- a/LayoutTests/fast/dom/NodeIterator/NodeIterator-dont-overcollect.html
+++ b/LayoutTests/fast/dom/NodeIterator/NodeIterator-gc-without-context-crash.html
@@ -3,6 +3,8 @@
<body>
<script src="../../js/resources/js-test-pre.js"></script>
<script>
+ jsTestIsAsync = true;
+
var callbackWasTriggered = false;
var callback = function(node) {
@@ -24,10 +26,17 @@
shouldBeTrue('callbackWasTriggered');
nodeIterator = null;
- gc();
- shouldBeTrue('nodeIteratorObservation.wasCollected');
- shouldBeTrue('nodeFilterObservation.wasCollected');
- shouldBeTrue('callbackObservation.wasCollected');
+
+ testRunner.evaluateScriptInIsolatedWorld(1, 'document.getElementById("body")'); // create a wrapper in isolated world
+ internals.garbageCollectV8WithoutContext();
+
+ setTimeout(function() {
+ shouldBeTrue('nodeIteratorObservation.wasCollected');
+ shouldBeTrue('nodeFilterObservation.wasCollected');
+ shouldBeTrue('callbackObservation.wasCollected');
+
+ finishJSTest();
+ }, 0);
</script>
<script src="../../js/resources/js-test-post.js"></script>
</body>

Powered by Google App Engine
This is Rietveld 408576698