| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <head> |
| 4 <title>HTMLAllCollection Tests</title> |
| 5 <link rel="author" title="Dan Druta" href="mailto:dan.druta@att.com"/> |
| 6 <link rel="help" href="2.7.2.1 - Common Infrastructure/Common DOM Interfaces/Col
lections/HTMLAllCollection"/> |
| 7 <meta name="flags" content="TOKENS" /> |
| 8 <meta name="assert" content="TEST ASSERTION"/> |
| 9 <script src="../../../../../../resources/testharness.js"></script> |
| 10 <script src="../../../../../../resources/testharnessreport.js"></script> |
| 11 </head> |
| 12 <body> |
| 13 <img src="../../../../images/green.png" name="picture"> |
| 14 <script> |
| 15 test(function(){ assert_equals(document.all.length,12)}, "Test for HTMLAllCollec
tion size"); |
| 16 |
| 17 test(function(){ assert_equals(document.all.item(0).tagName,"HTML")}, "Test look
up by index using ()"); |
| 18 |
| 19 test(function(){ assert_equals(document.all[0].tagName,"HTML")}, "Test lookup by
index using []"); |
| 20 |
| 21 test(function(){ assert_equals(document.all.tags("script").length,3)}, "Test for
multiple occurence 3 <script> found"); |
| 22 |
| 23 test(function(){ assert_equals(document.all.item("picture").nodeName,"IMG")}, "T
est lookup IMG by name"); |
| 24 |
| 25 test(function(){ assert_equals(document.all.namedItem("picture").nodeName,"IMG")
}, "Test lookup IMG by namedItem "); |
| 26 |
| 27 test(function(){ assert_equals(document.all("picture").nodeName,"IMG")}, "Test l
ookup IMG in collection using ()"); |
| 28 |
| 29 test(function(){ assert_equals(document.all["picture"].nodeName,"IMG")}, "Test l
ookup IMG in collection using []"); |
| 30 </script> |
| 31 <div id="log"></div> |
| 32 </body> |
| 33 </html> |
| OLD | NEW |