blob: 44cab4d10959f6ac0973ea57e8adc5ad7a8deecb [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.testRunner)
testRunner.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>