• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Test TreeWalker with rejection
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 'B2'
10PASS walker.nextNode(); walker.currentNode.id is 'B3'
11
12Testing firstChild
13PASS walker.firstChild(); walker.currentNode.id is 'A1'
14PASS walker.firstChild(); walker.currentNode.id is 'B2'
15
16Testing nextSibling
17PASS walker.firstChild(); walker.currentNode.id is 'A1'
18PASS walker.firstChild(); walker.currentNode.id is 'B1'
19PASS walker.nextSibling(); walker.currentNode.id is 'B3'
20
21Testing parentNode
22PASS walker.parentNode(); walker.currentNode.id is 'A1'
23
24Testing previousSibling
25PASS walker.previousSibling(); walker.currentNode.id is 'B1'
26
27Testing previousNode
28PASS walker.previousNode(); walker.currentNode.id is 'B2'
29PASS walker.previousNode(); walker.currentNode.id is 'A1'
30PASS successfullyParsed is true
31
32TEST COMPLETE
33
34