| <!-- Based on testcase from KDE bug #110629, heavily modified --> |
| <script src="../js/resources/js-test-pre.js"></script> |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| document.write("<b><font color=green>PASS</font></b> " + msg + "<br>"); |
| document.write("<b><font color=red>FAIL</font></b> " + msg + "<br>"); |
| document.write("<p> " + a + "</p>"); |
| <p>The following tests for regression against <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=4405">4405: <button> not listed in form collections.</a> You should see a series of lines starting with PASS.</p> |
| <input type="button" name="foo" id="foo" value="Button1"> |
| <button type="button" name="bla" id="bla" value="Button2">Button2</button> |
| shouldBe("document.test.elements.length", "2"); |
| shouldBe("document.test.elements[0].name", '"foo"'); |
| shouldBe("document.test.elements[1].name", '"bla"'); |
| shouldBe("document.test.foo.value", '"Button1"'); |
| shouldBe("document.test.bla.value", '"Button2"'); |