blob: 30a5757689f03a8bcf27137da3e054d3f3586dd7 [file] [log] [blame]
<p>This tests that dispatching a keyboard event created via javascript does
not crash.</p>
<p id="results"></p>
<input id="1">
<script>
if (window.testRunner)
testRunner.dumpAsText();
var evt = document.createEvent("KeyboardEvent");
evt.initKeyboardEvent("keydown", true, true, window, 0, 0, 0, 0, 0, 0, "a");
var elt = document.getElementById("1");
elt.focus();
elt.dispatchEvent(evt);
document.getElementById("results").innerText = "PASSED";
</script>