Index: LayoutTests/fast/forms/form-radio-node-list.html |
diff --git a/LayoutTests/fast/forms/form-radio-node-list.html b/LayoutTests/fast/forms/form-radio-node-list.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..192b816e82499daebe34ed0303f6517ec310b5fb |
--- /dev/null |
+++ b/LayoutTests/fast/forms/form-radio-node-list.html |
@@ -0,0 +1,42 @@ |
+<!doctype html> |
+<script src="../../resources/js-test.js"></script> |
+<form id="f1"> |
+ <button id=n1></button> |
+ <fieldset id=n1><legend id=legend1></legend></fieldset> |
+ <input name=n1 type=hidden> |
+ <input name=n1 type=image> |
+ <input name=n1 type=text> |
+ <input name=n1 type=radio> |
+ <keygen id=n1></keygen> |
+ <output id=n1></output> |
+ <object name=n1></object> |
+ <select name=n1><option id=n1></option></select> |
+ <textarea id=n1></textarea> |
+ <div id=n1></div> |
+ <option id=n1></option> |
+</form> |
+<script> |
+description("Test RadioNodeLists returned by the HTMLFormElement named-getter."); |
+ |
+var form1 = document.getElementById("f1"); |
+shouldBe("form1.elements.length", "10"); |
+ |
+debug("Check that only 'listed elements' are included in the list, if any."); |
+var radioNodeList = form1["n1"]; |
+shouldBe("radioNodeList.length", "10"); |
+ |
+shouldBeTrue("radioNodeList[0] instanceof HTMLButtonElement"); |
+shouldBeTrue("radioNodeList[1] instanceof HTMLFieldSetElement"); |
+shouldBeTrue("radioNodeList[2] instanceof HTMLInputElement"); |
+shouldBeEqualToString("radioNodeList[2].type", "hidden"); |
+shouldBeTrue("radioNodeList[3] instanceof HTMLInputElement"); |
+shouldBeEqualToString("radioNodeList[3].type", "text"); |
+shouldBeTrue("radioNodeList[4] instanceof HTMLInputElement"); |
+shouldBeEqualToString("radioNodeList[4].type", "radio"); |
+shouldBeTrue("radioNodeList[5] instanceof HTMLKeygenElement"); |
+shouldBeTrue("radioNodeList[6] instanceof HTMLOutputElement"); |
+shouldBeTrue("radioNodeList[7] instanceof HTMLObjectElement"); |
+shouldBeTrue("radioNodeList[8] instanceof HTMLSelectElement"); |
+shouldBeTrue("radioNodeList[9] instanceof HTMLTextAreaElement"); |
+</script> |
+ |