OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html><head> | 2 <html><head> |
3 <title>getElementsByClassName</title> | 3 <title>getElementsByClassName</title> |
4 <meta content="generic element listed" name="description"> | 4 <meta content="generic element listed" name="description"> |
5 <link href="https://dom.spec.whatwg.org/#dom-document-getelementsbyclassname
" rel="help"> | 5 <link href="https://dom.spec.whatwg.org/#dom-document-getelementsbyclassname
" rel="help"> |
6 <script src="../../../../resources/testharness.js"></script> | 6 <script src="../../../../resources/testharness.js"></script> |
7 <script src="../../../../resources/testharnessreport.js"></script> | 7 <script src="../../../../resources/testharnessreport.js"></script> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <div id="log"></div> | 10 <div id="log"></div> |
(...skipping 12 matching lines...) Expand all Loading... |
23 { | 23 { |
24 var collection = document.getElementsByClassName("te xt"); | 24 var collection = document.getElementsByClassName("te xt"); |
25 | 25 |
26 assert_equals(collection.length, 3); | 26 assert_equals(collection.length, 3); |
27 assert_equals(collection[0].parentNode.nodeName, "BODY"); | 27 assert_equals(collection[0].parentNode.nodeName, "BODY"); |
28 assert_equals(collection[1].parentNode.nodeName, "DIV"); | 28 assert_equals(collection[1].parentNode.nodeName, "DIV"); |
29 assert_equals(collection[2].parentNode.nodeName, "BODY"); | 29 assert_equals(collection[2].parentNode.nodeName, "BODY"); |
30 }, "generic element listed"); | 30 }, "generic element listed"); |
31 </script> | 31 </script> |
32 </body></html> | 32 </body></html> |
OLD | NEW |