2 <script src=
"../../resources/js-test.js"></script>
3 <div id=
"testDiv" style=
"display:none;">
4 <div id=
"div1">aaa
</div>
5 <div id=
"div2">bbb
</div>
8 description("This test removes the NodeItertor's current reference node, then continues to move through the document.");
10 var testDiv
= document
.getElementById("testDiv");
11 var div1
= document
.getElementById("div1");
12 var div2
= document
.getElementById("div2");
13 var iter
= document
.createNodeIterator(testDiv
, NodeFilter
.SHOW_ELEMENT
, null, false);
15 shouldBe("iter.nextNode()", "testDiv");
16 shouldBe("iter.nextNode()", "div1");
17 shouldBe("iter.nextNode()", "div2");
18 shouldBe("iter.nextNode()", "null");
19 shouldBe("iter.previousNode()", "div2");
20 shouldBe("iter.previousNode()", "div1");
21 testDiv
.removeChild(div1
);
22 shouldBe("iter.nextNode()", "div2");