blob: a8ac88eff958e2f26c44fd11b20253cb469a9c36 [file] [log] [blame]
<!-- Based on testcase from KDE bug #110629, heavily modified -->
<html> <head>
<script src="../../../resources/js-test.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body>
<p>The following tests for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=4405">4405: &lt;button&gt; not listed in form collections.</a> You should see a series of lines starting with PASS.</p>
<form name="test">
<input type="button" name="foo" id="foo" value="Button1">
<button type="button" name="bla" id="bla" value="Button2">Button2</button>
</form>
<br>
<script>
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"');
</script>
</body>
</html>