| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../js/resources/js-test-pre.js"></script> |
| 4 <script> | 4 <script> |
| 5 function runTest() | 5 function runTest() |
| 6 { | 6 { |
| 7 description("This tests accessing form elements by name. " | 7 description("This tests accessing form elements by name. " |
| 8 + "IE only lets you look up names under the first name the element had a
nd " | 8 + "IE only lets you look up names under the first name the element had a
nd " |
| 9 + "does not respond to name changes. Firefox remembers every name item h
as been " | 9 + "does not respond to name changes. Firefox remembers every name item h
as been " |
| 10 + "accessed with, but forgets items that have not been accessed. " | 10 + "accessed with, but forgets items that have not been accessed. " |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 shouldNotBe("form1['foo']", "input3"); | 184 shouldNotBe("form1['foo']", "input3"); |
| 185 | 185 |
| 186 debug(""); | 186 debug(""); |
| 187 debug("Don't add the element from the past names map if we've found elements of
the given name."); | 187 debug("Don't add the element from the past names map if we've found elements of
the given name."); |
| 188 var form4 = document.querySelector("#form4"); | 188 var form4 = document.querySelector("#form4"); |
| 189 shouldBe("form4['foo']", "form4.childNodes[0]"); | 189 shouldBe("form4['foo']", "form4.childNodes[0]"); |
| 190 shouldBe("form4['bar'][0]", "form4.childNodes[1]"); | 190 shouldBe("form4['bar'][0]", "form4.childNodes[1]"); |
| 191 shouldBe("form4['bar'][1]", "form4.childNodes[2]"); | 191 shouldBe("form4['bar'][1]", "form4.childNodes[2]"); |
| 192 shouldBe("form4.childNodes[0].name = 'bar'; form4.childNodes[1].name = form4.chi
ldNodes[2].name = 'foo'; form4['foo'].length", "2"); | 192 shouldBe("form4.childNodes[0].name = 'bar'; form4.childNodes[1].name = form4.chi
ldNodes[2].name = 'foo'; form4['foo'].length", "2"); |
| 193 </script> | 193 </script> |
| 194 <script src="../js/resources/js-test-post.js"></script> | |
| 195 </body> | 194 </body> |
| 196 </html> | 195 </html> |
| OLD | NEW |