| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>NodeIterator: Basic test</title> | 4 <title>This test checks the basic functionality of NodeIterator.</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> | |
| 11 <script> | 10 <script> |
| 12 function createSampleDOM() | 11 function createSampleDOM() |
| 13 { | 12 { |
| 14 // Tree order: #a -> "b" -> #c -> #d -> "e" -> #f -> "g" -> <!--h--> -> "i"
-> <!--j-->. | 13 // Tree order: #a -> "b" -> #c -> #d -> "e" -> #f -> "g" -> <!--h--> -> "i"
-> <!--j-->. |
| 15 var div = document.createElement('div'); | 14 var div = document.createElement('div'); |
| 16 div.id = 'a'; | 15 div.id = 'a'; |
| 17 div.innerHTML = 'b<div id="c"><div id="d">e<span id="f">g<!--h--></span>i</d
iv><!--j--></div>'; | 16 div.innerHTML = 'b<div id="c"><div id="d">e<span id="f">g<!--h--></span>i</d
iv><!--j--></div>'; |
| 18 return div; | 17 return div; |
| 19 } | 18 } |
| 20 | 19 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 test(function() { | 195 test(function() { |
| 197 var nodeIterator = document.createNodeIterator(document.body, 42, null); | 196 var nodeIterator = document.createNodeIterator(document.body, 42, null); |
| 198 assert_equals(nodeIterator.root, document.body); | 197 assert_equals(nodeIterator.root, document.body); |
| 199 assert_equals(nodeIterator.referenceNode, document.body); | 198 assert_equals(nodeIterator.referenceNode, document.body); |
| 200 assert_equals(nodeIterator.whatToShow, 42); | 199 assert_equals(nodeIterator.whatToShow, 42); |
| 201 assert_equals(nodeIterator.filter, null); | 200 assert_equals(nodeIterator.filter, null); |
| 202 }, "Optional arguments to createNodeIterator should be optional (3 passed, null)
."); | 201 }, "Optional arguments to createNodeIterator should be optional (3 passed, null)
."); |
| 203 </script> | 202 </script> |
| 204 </body> | 203 </body> |
| 205 </html> | 204 </html> |
| OLD | NEW |