OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <!-- | 3 <!-- |
4 Test adapted from https://mxr.mozilla.org/chromium/source/src/third_party/WebKit
/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js | 4 Test adapted from https://dxr.mozilla.org/chromium/source/src/third_party/WebKit
/LayoutTests/fast/dom/TreeWalker/script-tests/acceptNode-filter.js |
5 --> | 5 --> |
6 <head> | 6 <head> |
7 <title>TreeWalker: acceptNode-filter</title> | 7 <title>TreeWalker: acceptNode-filter</title> |
8 <script src="/resources/testharness.js"></script> | 8 <script src="/resources/testharness.js"></script> |
9 <script src="/resources/testharnessreport.js"></script> | 9 <script src="/resources/testharnessreport.js"></script> |
10 <script src="traversal-support.js"></script> | 10 <script src="traversal-support.js"></script> |
11 <div id=log></div> | 11 <div id=log></div> |
12 </head> | 12 </head> |
13 <body> | 13 <body> |
14 <p>Test JS objects as NodeFilters</p> | 14 <p>Test JS objects as NodeFilters</p> |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 }); | 146 }); |
147 assert_throws(test_error, function () { walker.firstChild(); }); | 147 assert_throws(test_error, function () { walker.firstChild(); }); |
148 assert_node(walker.currentNode, { type: Element, id: 'root' }); | 148 assert_node(walker.currentNode, { type: Element, id: 'root' }); |
149 assert_throws(test_error, function () { walker.nextNode(); }); | 149 assert_throws(test_error, function () { walker.nextNode(); }); |
150 assert_node(walker.currentNode, { type: Element, id: 'root' }); | 150 assert_node(walker.currentNode, { type: Element, id: 'root' }); |
151 }, 'Testing with filter object that throws'); | 151 }, 'Testing with filter object that throws'); |
152 | 152 |
153 </script> | 153 </script> |
154 </body> | 154 </body> |
155 </html> | 155 </html> |
OLD | NEW |