blob: 2787f902ef0afc19aceb56ed0eb956a5f160c915 [file] [log] [blame]
<p>This test verifies that the ENTER key fires the change event.</p>
<hr>
<input id="input" type="password" 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>