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

Unified Diff: LayoutTests/fast/dom/NodeFilterCondition-leak-document.html

Issue 21274004: Fix Document leak from NodeFilter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add assertions to wrap Created 7 years, 5 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/NodeFilterCondition-leak-document.html
diff --git a/LayoutTests/editing/selection/leak-document-with-selection-inside.html b/LayoutTests/fast/dom/NodeFilterCondition-leak-document.html
similarity index 70%
copy from LayoutTests/editing/selection/leak-document-with-selection-inside.html
copy to LayoutTests/fast/dom/NodeFilterCondition-leak-document.html
index 763fac38f7bca997a247ef902442f4d23568fb89..9741043f557d181903070b54cb198bd0819729bf 100644
--- a/LayoutTests/editing/selection/leak-document-with-selection-inside.html
+++ b/LayoutTests/fast/dom/NodeFilterCondition-leak-document.html
@@ -1,12 +1,12 @@
<html>
<head>
-<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="../js/resources/js-test-pre.js"></script>
</head>
<body>
<span>This test only runs on DumpRenderTree, as it requires existence of window.internals and cross-domain resource access check disabled.</span>
<iframe id="f" src='about:blank'></iframe>
<script>
- description("This test asserts that document doesn't leak when a selection is created inside the document.");
+ description("This test asserts that document doesn't leak when a NodeFilter callback referencing the document is created.");
jsTestIsAsync = true;
if (!window.internals)
@@ -42,8 +42,12 @@
}
frame.src = 'about:blank';
}
- frame.src='data:text/html;charset=utf-8,<span id="t"></span>';
+ var src = 'data:text/html;charset=utf-8,<script>' +
+ 'keepNodeIterator = document.createNodeIterator(document, NodeFilter.SHOW_ELEMENT, function(node) { return NodeFilter.SHOW_ELEMENT; }, false);' +
+ 'keepTreeWalker = document.createTreeWalker(document, NodeFilter.SHOW_ELEMENT, function(node) { return NodeFilter.SHOW_ELEMENT; }, false);' +
+ '</script'+'>';
+ frame.src = src;
haraken 2013/08/01 13:32:20 I'm sorry I was misreading the tests in your previ
kouhei (in TOK) 2013/08/02 03:26:57 Done.
</script>
- <script src="../../fast/js/resources/js-test-post.js"></script>
+ <script src="../js/resources/js-test-post.js"></script>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/NodeFilterCondition-leak-document-expected.txt » ('j') | Source/bindings/v8/V8Binding.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698