blob: 2887207ada4c930d714d666ab67f21be6fb62d55 [file] [log] [blame]
<p>This test verifies that the ENTER key fires the change event.</p>
<hr>
<input id="input" type="search" onchange="changeHandler()" onblur="blurHandler()"></input>
<pre id="console"></pre>
<script>
function log(s)
{
document.getElementById('console').appendChild(document.createTextNode(s + "\n"));
}
function changeHandler()
{
log ('PASS: change event fired.\n');
}
function blurHandler()
{
log ('blur event fired.\n');
}
if (window.layoutTestController)
layoutTestController.dumpAsText();
// change the field
document.getElementById('input').focus();
document.execCommand("InsertText", false, "foo bar baz");
// hit enter
input.focus();
if (window.eventSender)
eventSender.keyDown("\r", []);
</script>