Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html

Issue 366223006: createTreeWalker and createNodeIterator should deal with null NodeFilter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use fully qualified variable name Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/NodeIterator/NodeIterator-basic-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>NodeIterator: Basic test</title> 4 <title>NodeIterator: Basic test</title>
5 <script src="../../../resources/testharness.js"></script> 5 <script src="../../../resources/testharness.js"></script>
6 <script src="../../../resources/testharnessreport.js"></script> 6 <script src="../../../resources/testharnessreport.js"></script>
7 <link rel="stylesheet" href="../../../resources/testharness.css"> 7 <link rel="stylesheet" href="../../../resources/testharness.css">
8 </head> 8 </head>
9 <body> 9 <body>
10 <p>This test checks the basic functionality of NodeIterator.</p> 10 <p>This test checks the basic functionality of NodeIterator.</p>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 var filter = function (node) { 186 var filter = function (node) {
187 return NodeFilter.FILTER_ACCEPT; 187 return NodeFilter.FILTER_ACCEPT;
188 }; 188 };
189 [true, false].forEach(function (expandEntityReferences) { 189 [true, false].forEach(function (expandEntityReferences) {
190 var iterator = document.createNodeIterator(createSampleDOM(), NodeFilter .SHOW_ALL, filter, expandEntityReferences); 190 var iterator = document.createNodeIterator(createSampleDOM(), NodeFilter .SHOW_ALL, filter, expandEntityReferences);
191 assert_true(iterator instanceof NodeIterator); 191 assert_true(iterator instanceof NodeIterator);
192 assert_false(iterator.expandEntityReferences); 192 assert_false(iterator.expandEntityReferences);
193 testIteratorForwardAndBackward(iterator, expectedAll); 193 testIteratorForwardAndBackward(iterator, expectedAll);
194 }); 194 });
195 }, 'Test that the fourth argument (expandEntityReferences) is ignored.'); 195 }, 'Test that the fourth argument (expandEntityReferences) is ignored.');
196
197 test(function() {
198 var nodeIterator = document.createNodeIterator(document.body, 42, null);
199 assert_equals(nodeIterator.root, document.body);
200 assert_equals(nodeIterator.referenceNode, document.body);
201 assert_equals(nodeIterator.whatToShow, 42);
202 assert_equals(nodeIterator.filter, null);
203 }, "Optional arguments to createNodeIterator should be optional (3 passed, null) .");
196 </script> 204 </script>
197 </body> 205 </body>
198 </html> 206 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/NodeIterator/NodeIterator-basic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698