OLD | NEW |
1 Test JS objects as NodeFilters. | 1 Test JS objects as NodeFilters. |
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 Testing with raw function filter | 6 Testing with raw function filter |
7 filtering node A1 | 7 filtering node A1 [this=[object Window]] |
8 PASS walker.firstChild(); walker.currentNode.id is 'A1' | 8 PASS walker.firstChild(); walker.currentNode.id is 'A1' |
9 filtering node B1 | 9 filtering node B1 [this=[object Window]] |
10 filtering node B2 | 10 filtering node B2 [this=[object Window]] |
| 11 PASS walker.nextNode(); walker.currentNode.id is 'B2' |
| 12 |
| 13 Testing with strict raw function filter |
| 14 filtering node A1 [this=undefined] |
| 15 PASS walker.firstChild(); walker.currentNode.id is 'A1' |
| 16 filtering node B1 [this=undefined] |
| 17 filtering node B2 [this=undefined] |
11 PASS walker.nextNode(); walker.currentNode.id is 'B2' | 18 PASS walker.nextNode(); walker.currentNode.id is 'B2' |
12 | 19 |
13 Testing with object filter | 20 Testing with object filter |
14 filtering node A1 | 21 filtering node A1 [this=custom node filter] |
15 PASS walker.firstChild(); walker.currentNode.id is 'A1' | 22 PASS walker.firstChild(); walker.currentNode.id is 'A1' |
16 filtering node B1 | 23 filtering node B1 [this=custom node filter] |
17 filtering node B2 | 24 filtering node B2 [this=custom node filter] |
18 PASS walker.nextNode(); walker.currentNode.id is 'B2' | 25 PASS walker.nextNode(); walker.currentNode.id is 'B2' |
19 | 26 |
20 Testing with null filter | 27 Testing with null filter |
21 PASS walker.firstChild(); walker.currentNode.id is 'A1' | 28 PASS walker.firstChild(); walker.currentNode.id is 'A1' |
22 PASS walker.nextNode(); walker.currentNode.id is 'B1' | 29 PASS walker.nextNode(); walker.currentNode.id is 'B1' |
23 | 30 |
24 Testing with undefined filter | 31 Testing with undefined filter |
25 PASS walker.firstChild(); walker.currentNode.id is 'A1' | 32 PASS walker.firstChild(); walker.currentNode.id is 'A1' |
26 PASS walker.nextNode(); walker.currentNode.id is 'B1' | 33 PASS walker.nextNode(); walker.currentNode.id is 'B1' |
27 | 34 |
(...skipping 16 matching lines...) Expand all Loading... |
44 Testing acceptNode callee | 51 Testing acceptNode callee |
45 Callee: function (node) { | 52 Callee: function (node) { |
46 debug('Callee: ' + arguments.callee); | 53 debug('Callee: ' + arguments.callee); |
47 return NodeFilter.FILTER_ACCEPT; | 54 return NodeFilter.FILTER_ACCEPT; |
48 } | 55 } |
49 PASS walker.firstChild(); walker.currentNode.id is 'A1' | 56 PASS walker.firstChild(); walker.currentNode.id is 'A1' |
50 PASS successfullyParsed is true | 57 PASS successfullyParsed is true |
51 | 58 |
52 TEST COMPLETE | 59 TEST COMPLETE |
53 | 60 |
OLD | NEW |