blob: 6aa60f6d46bff07ff868a33f0113d326cf673fc0 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
function beginTest()
{
if (!window.eventSender || !window.internals || !window.testRunner)
return;
internals.settings.setInputEventsEnabled(true);
testRunner.dumpAsText();
document.querySelector("#foo").focus();
eventSender.keyDown("a", []);
}
function checkInputEvent(event)
{
debug("FAIL: Did not expect to the `oninput` handler to fire.");
}
function checkBeforeInputEvent(event)
{
debug("Fired `onbeforeinput`: preventing default!");
event.preventDefault();
}
</script>
</head>
<body onload=beginTest()>
<div id="foo" contenteditable oninput=checkInputEvent(event) onbeforeinput=checkBeforeInputEvent(event)></div>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>