| <!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; |
| |
| 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> |