blob: d6b73e519a0b51e3ee63fd579712d5d61a944571 [file] [log] [blame]
<head>
<script>
function print(message)
{
var paragraph = document.createElement("li");
paragraph.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(paragraph);
}
function submitHandler(e)
{
e.preventDefault();
print("Tried to submit form.");
}
function test()
{
document.getElementById("form").onsubmit = submitHandler;
document.getElementById("select").focus();
if (window.layoutTestController) {
layoutTestController.dumpAsText();
eventSender.keyDown("\r", []);
}
}
</script>
</head>
<body onload="test()">
<p>This test checks to see if hitting the Enter key on a select box submits the form or checks the check box.</p>
<p>If the test passes, the text below should say "tried to submit form".</p>
<hr>
<form id=form>
<select id=select size=3><option>a</option></select>
</form>
<hr>
<p><ol id=console></ol></p>
</body>