chromium/third_party/blink/web_tests/plugins/keyboard-events.html

<!DOCTYPE html>
<html>
<head>
<script src="../resources/plugin.js"></script>
<script>
startAfterLoadAndFinish(function () {
    if (!window.testRunner) {
        document.body.appendChild(document.createTextNode("This test does not work in manual mode."));
        return;
    }

    testRunner.dumpAsText();

    // Send a mouse-click event to set the input focus to the test plugin.
    eventSender.mouseMoveTo(0,0);
    eventSender.mouseMoveTo(20,20);
    eventSender.mouseDown();
    eventSender.mouseUp();

    // Send keyboard events to the plugin.
    eventSender.keyDown('a');
    eventSender.keyDown('b');
    eventSender.keyDown('c');
});
</script>
</head>
<body>
<embed type="application/x-webkit-test-webplugin" width=100 height=100></embed>
<p>This test checks if a plugin can receive keyboard events sent from eventSender. This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34936">Bug 34936</a>.</p>
</body>
</html>