• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Test TreeWalker with skipping
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
7Testing nextNode
8PASS walker.nextNode(); walker.currentNode.id is 'A1'
9PASS walker.nextNode(); walker.currentNode.id is 'C1'
10PASS walker.nextNode(); walker.currentNode.id is 'B2'
11PASS walker.nextNode(); walker.currentNode.id is 'B3'
12
13Testing firstChild
14PASS walker.firstChild(); walker.currentNode.id is 'A1'
15PASS walker.firstChild(); walker.currentNode.id is 'C1'
16
17Testing nextSibling
18PASS walker.firstChild(); walker.currentNode.id is 'A1'
19PASS walker.firstChild(); walker.currentNode.id is 'B1'
20PASS walker.nextSibling(); walker.currentNode.id is 'B3'
21
22Testing parentNode
23PASS walker.parentNode(); walker.currentNode.id is 'A1'
24
25Testing previousSibling
26PASS walker.previousSibling(); walker.currentNode.id is 'B1'
27
28Testing previousNode
29PASS walker.previousNode(); walker.currentNode.id is 'B2'
30PASS walker.previousNode(); walker.currentNode.id is 'C1'
31PASS walker.previousNode(); walker.currentNode.id is 'A1'
32PASS successfullyParsed is true
33
34TEST COMPLETE
35
36