Home | History | Annotate | Download | only in TreeWalker
      1 Tests the TreeWalker.
      2 
      3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
      4 
      5 
      6 Test that TreeWalker.parent() doesn't set the currentNode to a node not under the root.
      7 
      8 PASS w.currentNode is subTree
      9 PASS w.parentNode() is null
     10 PASS w.currentNode is subTree
     11 
     12 Test that we handle setting the currentNode to arbitrary nodes not under the root element.
     13 
     14 PASS w.parentNode() is null
     15 PASS w.currentNode is document.documentElement
     16 PASS w.nextNode() is document.documentElement.firstChild
     17 PASS w.currentNode is document.documentElement.firstChild
     18 PASS w.previousNode() is null
     19 PASS w.currentNode is document.documentElement
     20 PASS w.firstChild() is document.documentElement.firstChild
     21 PASS w.currentNode is document.documentElement.firstChild
     22 PASS w.lastChild() is document.documentElement.lastChild
     23 PASS w.currentNode is document.documentElement.lastChild
     24 PASS w.nextSibling() is null
     25 PASS w.currentNode is document.documentElement
     26 PASS w.previousSibling() is null
     27 PASS w.currentNode is document.documentElement
     28 
     29 Test how we handle the case when the traversed to node within the root, but the currentElement is not.
     30 
     31 PASS w.nextNode() is subTree
     32 PASS w.lastChild() is subTree
     33 PASS successfullyParsed is true
     34 
     35 TEST COMPLETE
     36 
     37