| Test TreeWalker with rejection |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| |
| Testing nextNode |
| PASS walker.nextNode(); walker.currentNode.id is 'A1' |
| PASS walker.nextNode(); walker.currentNode.id is 'B2' |
| PASS walker.nextNode(); walker.currentNode.id is 'B3' |
| |
| Testing firstChild |
| PASS walker.firstChild(); walker.currentNode.id is 'A1' |
| PASS walker.firstChild(); walker.currentNode.id is 'B2' |
| |
| Testing nextSibling |
| PASS walker.firstChild(); walker.currentNode.id is 'A1' |
| PASS walker.firstChild(); walker.currentNode.id is 'B1' |
| PASS walker.nextSibling(); walker.currentNode.id is 'B3' |
| |
| Testing parentNode |
| PASS walker.parentNode(); walker.currentNode.id is 'A1' |
| |
| Testing previousSibling |
| PASS walker.previousSibling(); walker.currentNode.id is 'B1' |
| |
| Testing previousNode |
| PASS walker.previousNode(); walker.currentNode.id is 'B2' |
| PASS walker.previousNode(); walker.currentNode.id is 'A1' |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |