blob: d9ea239aff26124949fef514a87e0403afe21684 [file] [log] [blame]
Tests the TreeWalker.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Test that TreeWalker.parent() doesn't set the currentNode to a node not under the root.
PASS w.currentNode is subTree
PASS w.parentNode() is null
PASS w.currentNode is subTree
Test that we handle setting the currentNode to arbitrary nodes not under the root element.
PASS w.parentNode() is null
PASS w.currentNode is document.documentElement
PASS w.nextNode() is document.documentElement.firstChild
PASS w.currentNode is document.documentElement.firstChild
PASS w.previousNode() is null
PASS w.currentNode is document.documentElement
PASS w.firstChild() is document.documentElement.firstChild
PASS w.currentNode is document.documentElement.firstChild
PASS w.lastChild() is document.documentElement.lastChild
PASS w.currentNode is document.documentElement.lastChild
PASS w.nextSibling() is null
PASS w.currentNode is document.documentElement
PASS w.previousSibling() is null
PASS w.currentNode is document.documentElement
Test how we handle the case when the traversed to node within the root, but the currentElement is not.
PASS w.nextNode() is subTree
PASS w.lastChild() is subTree
PASS successfullyParsed is true
TEST COMPLETE