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="multiple class attributes" name="description"> | 4 <meta content="multiple class attributes" 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 10 matching lines...) Expand all Loading... |
21 test(function() | 21 test(function() |
22 { | 22 { |
23 var collection = document.getElementsByClassName("te xt"); | 23 var collection = document.getElementsByClassName("te xt"); |
24 | 24 |
25 assert_equals(collection.length, 2); | 25 assert_equals(collection.length, 2); |
26 assert_equals(collection[0].parentNode.nodeName, "BODY"); | 26 assert_equals(collection[0].parentNode.nodeName, "BODY"); |
27 assert_equals(collection[1].parentNode.nodeName, "BODY"); | 27 assert_equals(collection[1].parentNode.nodeName, "BODY"); |
28 }, "multiple class attributes"); | 28 }, "multiple class attributes"); |
29 </script> | 29 </script> |
30 </body></html> | 30 </body></html> |
OLD | NEW |