OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <form> | 3 <form> |
4 <input name="radios" type="radio"> | 4 <input name="radios" type="radio"> |
5 <input name="radios" type="radio"> | 5 <input name="radios" type="radio"> |
6 </form> | 6 </form> |
7 <script src="../../js/resources/js-test-pre.js"></script> | 7 <script src="../../js/resources/js-test-pre.js"></script> |
8 <script> | 8 <script> |
9 | 9 |
10 var nodeListKind = { | 10 var nodeListKind = { |
11 ChildNodeListType: 'document.body.childNodes', | 11 ChildNodeListType: 'document.body.childNodes', |
12 ClassNodeListType: 'document.getElementsByClassName("class")', | 12 ClassNodeListType: 'document.getElementsByClassName("class")', |
13 NameNodeListType: 'document.getElementsByName("name")', | 13 NameNodeListType: 'document.getElementsByName("name")', |
14 TagNodeListType: 'document.getElementsByTagName("body")', | 14 TagNodeListType: 'document.getElementsByTagName("body")', |
15 RadioNodeListType: 'document.querySelector("form").elements["radios"]', | 15 RadioNodeListType: 'document.querySelector("form").elements["radios"]', |
16 LabelsNodeListType: 'document.querySelector("input").labels', | 16 LabelsNodeListType: 'document.querySelector("input").labels', |
17 // Microdata is not enabled. | |
18 // MicroDataItemListType: 'document.getItems("items")', | |
19 }; | 17 }; |
20 | 18 |
21 var i = 1; | 19 var i = 1; |
22 for (var kind in nodeListKind) { | 20 for (var kind in nodeListKind) { |
23 var code = nodeListKind[kind]; | 21 var code = nodeListKind[kind]; |
24 eval(code).customProperty = i; | 22 eval(code).customProperty = i; |
25 gc(); | 23 gc(); |
26 shouldBe(code + '.customProperty', '' + i++); | 24 shouldBe(code + '.customProperty', '' + i++); |
27 } | 25 } |
28 | 26 |
29 </script> | 27 </script> |
30 <script src="../../js/resources/js-test-post.js"></script> | 28 <script src="../../js/resources/js-test-post.js"></script> |
31 </body> | 29 </body> |
OLD | NEW |