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

Unified Diff: LayoutTests/fast/dom/NodeIterator/detach-no-op.html

Issue 256013002: Make NodeIterator.detach() a no-op (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take feedback into consideration Created 6 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/NodeIterator/detach-no-op-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/NodeIterator/detach-no-op.html
diff --git a/LayoutTests/fast/dom/NodeIterator/detach-no-op.html b/LayoutTests/fast/dom/NodeIterator/detach-no-op.html
new file mode 100644
index 0000000000000000000000000000000000000000..9db5cc1b2f7e5367081fb2f0f481e2feb5dc7b7f
--- /dev/null
+++ b/LayoutTests/fast/dom/NodeIterator/detach-no-op.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="help" href="http://dom.spec.whatwg.org/#dom-nodeiterator-detach">
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("This test checks that NodeIterator.detach() is a no-op.");
+
+function createSampleDOM()
+{
+ var div = document.createElement('div');
+ div.id = 'a';
+ div.innerHTML = '<div id="b">';
+ return div;
+}
+
+var root = createSampleDOM();
+var iterator = document.createNodeIterator(root);
+shouldBeEqualToString('iterator.nextNode().id', 'a');
+shouldNotThrow('iterator.detach()');
+shouldBeEqualToString('iterator.nextNode().id', 'b');
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/NodeIterator/detach-no-op-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698