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> |