| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
| 3 <form id="f1"> | 3 <form id="f1"> |
| 4 <button id=n1></button> | 4 <button id=n1></button> |
| 5 <fieldset id=n1><legend id=legend1></legend></fieldset> | 5 <fieldset id=n1><legend id=legend1></legend></fieldset> |
| 6 <input name=n1 type=hidden> | 6 <input name=n1 type=hidden> |
| 7 <input name=n1 type=image> | 7 <input name=n1 type=image> |
| 8 <input name=n1 type=text> | 8 <input name=n1 type=text> |
| 9 <input name=n1 type=radio> | 9 <input name=n1 type=radio> |
| 10 <keygen id=n1></keygen> | |
| 11 <output id=n1></output> | 10 <output id=n1></output> |
| 12 <object name=n1></object> | 11 <object name=n1></object> |
| 13 <select name=n1><option id=n1></option></select> | 12 <select name=n1><option id=n1></option></select> |
| 14 <textarea id=n1></textarea> | 13 <textarea id=n1></textarea> |
| 15 <div id=n1></div> | 14 <div id=n1></div> |
| 16 <option id=n1></option> | 15 <option id=n1></option> |
| 17 </form> | 16 </form> |
| 18 <script> | 17 <script> |
| 19 description("Test RadioNodeLists returned by the HTMLFormElement named-getter.")
; | 18 description("Test RadioNodeLists returned by the HTMLFormElement named-getter.")
; |
| 20 | 19 |
| 21 var form1 = document.getElementById("f1"); | 20 var form1 = document.getElementById("f1"); |
| 22 shouldBe("form1.elements.length", "10"); | 21 shouldBe("form1.elements.length", "9"); |
| 23 | 22 |
| 24 debug("Check that only 'listed elements' are included in the list, if any."); | 23 debug("Check that only 'listed elements' are included in the list, if any."); |
| 25 var radioNodeList = form1["n1"]; | 24 var radioNodeList = form1["n1"]; |
| 26 shouldBe("radioNodeList.length", "10"); | 25 shouldBe("radioNodeList.length", "9"); |
| 27 | 26 |
| 28 shouldBeTrue("radioNodeList[0] instanceof HTMLButtonElement"); | 27 shouldBeTrue("radioNodeList[0] instanceof HTMLButtonElement"); |
| 29 shouldBeTrue("radioNodeList[1] instanceof HTMLFieldSetElement"); | 28 shouldBeTrue("radioNodeList[1] instanceof HTMLFieldSetElement"); |
| 30 shouldBeTrue("radioNodeList[2] instanceof HTMLInputElement"); | 29 shouldBeTrue("radioNodeList[2] instanceof HTMLInputElement"); |
| 31 shouldBeEqualToString("radioNodeList[2].type", "hidden"); | 30 shouldBeEqualToString("radioNodeList[2].type", "hidden"); |
| 32 shouldBeTrue("radioNodeList[3] instanceof HTMLInputElement"); | 31 shouldBeTrue("radioNodeList[3] instanceof HTMLInputElement"); |
| 33 shouldBeEqualToString("radioNodeList[3].type", "text"); | 32 shouldBeEqualToString("radioNodeList[3].type", "text"); |
| 34 shouldBeTrue("radioNodeList[4] instanceof HTMLInputElement"); | 33 shouldBeTrue("radioNodeList[4] instanceof HTMLInputElement"); |
| 35 shouldBeEqualToString("radioNodeList[4].type", "radio"); | 34 shouldBeEqualToString("radioNodeList[4].type", "radio"); |
| 36 shouldBeTrue("radioNodeList[5] instanceof HTMLKeygenElement"); | 35 shouldBeTrue("radioNodeList[5] instanceof HTMLOutputElement"); |
| 37 shouldBeTrue("radioNodeList[6] instanceof HTMLOutputElement"); | 36 shouldBeTrue("radioNodeList[6] instanceof HTMLObjectElement"); |
| 38 shouldBeTrue("radioNodeList[7] instanceof HTMLObjectElement"); | 37 shouldBeTrue("radioNodeList[7] instanceof HTMLSelectElement"); |
| 39 shouldBeTrue("radioNodeList[8] instanceof HTMLSelectElement"); | 38 shouldBeTrue("radioNodeList[8] instanceof HTMLTextAreaElement"); |
| 40 shouldBeTrue("radioNodeList[9] instanceof HTMLTextAreaElement"); | |
| 41 </script> | 39 </script> |
| 42 | 40 |
| OLD | NEW |