| OLD | NEW |
| 1 Tests the TreeWalker. | 1 Tests the TreeWalker. |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 Test that TreeWalker.parent() doesn't set the currentNode to a node not under th
e root. | 6 Test that TreeWalker.parent() doesn't set the currentNode to a node not under th
e root. |
| 7 | 7 |
| 8 PASS w.currentNode is subTree | 8 PASS w.currentNode is subTree |
| 9 PASS w.parentNode() is null | 9 PASS w.parentNode() is null |
| 10 PASS w.currentNode is subTree | 10 PASS w.currentNode is subTree |
| 11 | 11 |
| 12 Test that setting the currentNode to non-Node values throws. |
| 13 |
| 14 PASS w.currentNode = null threw exception TypeError: Failed to set the 'currentN
ode' property on 'TreeWalker': The provided value is not of type 'Node'.. |
| 15 PASS w.currentNode = {} threw exception TypeError: Failed to set the 'currentNod
e' property on 'TreeWalker': The provided value is not of type 'Node'.. |
| 16 PASS w.currentNode = window threw exception TypeError: Failed to set the 'curren
tNode' property on 'TreeWalker': The provided value is not of type 'Node'.. |
| 17 |
| 12 Test that we handle setting the currentNode to arbitrary nodes not under the roo
t element. | 18 Test that we handle setting the currentNode to arbitrary nodes not under the roo
t element. |
| 13 | 19 |
| 14 PASS w.parentNode() is null | 20 PASS w.parentNode() is null |
| 15 PASS w.currentNode is document.documentElement | 21 PASS w.currentNode is document.documentElement |
| 16 PASS w.nextNode() is document.documentElement.firstChild | 22 PASS w.nextNode() is document.documentElement.firstChild |
| 17 PASS w.currentNode is document.documentElement.firstChild | 23 PASS w.currentNode is document.documentElement.firstChild |
| 18 PASS w.previousNode() is null | 24 PASS w.previousNode() is null |
| 19 PASS w.currentNode is document.documentElement | 25 PASS w.currentNode is document.documentElement |
| 20 PASS w.firstChild() is document.documentElement.firstChild | 26 PASS w.firstChild() is document.documentElement.firstChild |
| 21 PASS w.currentNode is document.documentElement.firstChild | 27 PASS w.currentNode is document.documentElement.firstChild |
| 22 PASS w.lastChild() is document.documentElement.lastChild | 28 PASS w.lastChild() is document.documentElement.lastChild |
| 23 PASS w.currentNode is document.documentElement.lastChild | 29 PASS w.currentNode is document.documentElement.lastChild |
| 24 PASS w.nextSibling() is null | 30 PASS w.nextSibling() is null |
| 25 PASS w.currentNode is document.documentElement | 31 PASS w.currentNode is document.documentElement |
| 26 PASS w.previousSibling() is null | 32 PASS w.previousSibling() is null |
| 27 PASS w.currentNode is document.documentElement | 33 PASS w.currentNode is document.documentElement |
| 28 | 34 |
| 29 Test how we handle the case when the traversed to node within the root, but the
currentElement is not. | 35 Test how we handle the case when the traversed to node within the root, but the
currentElement is not. |
| 30 | 36 |
| 31 PASS w.nextNode() is subTree | 37 PASS w.nextNode() is subTree |
| 32 PASS w.lastChild() is subTree | 38 PASS w.lastChild() is subTree |
| 33 PASS successfullyParsed is true | 39 PASS successfullyParsed is true |
| 34 | 40 |
| 35 TEST COMPLETE | 41 TEST COMPLETE |
| 36 | 42 |
| OLD | NEW |