OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
3 <title>HTMLCollection and empty names</title> | 3 <title>HTMLCollection and empty names</title> |
4 <script src=../../../../resources/testharness.js></script> | 4 <script src=../../../../resources/testharness.js></script> |
5 <script src=../../../../resources/testharnessreport.js></script> | 5 <script src=../../../../resources/testharnessreport.js></script> |
6 <div id=log></div> | 6 <div id=log></div> |
7 <div id=test> | 7 <div id=test> |
8 <div class=a id></div> | 8 <div class=a id></div> |
9 <div class=a name></div> | 9 <div class=a name></div> |
10 <a class=a name></a> | 10 <a class=a name></a> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 }, "Empty string as a name for Element.getElementsByClassName"); | 56 }, "Empty string as a name for Element.getElementsByClassName"); |
57 | 57 |
58 test(function() { | 58 test(function() { |
59 var div = document.getElementById("test"); | 59 var div = document.getElementById("test"); |
60 var c = div.children; | 60 var c = div.children; |
61 assert_false("" in c, "Empty string should not be in the collection."); | 61 assert_false("" in c, "Empty string should not be in the collection."); |
62 assert_equals(c[""], undefined, "Named getter should return undefined for empt
y string."); | 62 assert_equals(c[""], undefined, "Named getter should return undefined for empt
y string."); |
63 assert_equals(c.namedItem(""), null, "namedItem should return null for empty s
tring."); | 63 assert_equals(c.namedItem(""), null, "namedItem should return null for empty s
tring."); |
64 }, "Empty string as a name for Element.children"); | 64 }, "Empty string as a name for Element.children"); |
65 </script> | 65 </script> |
OLD | NEW |