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