Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / plugins / keypress-event.html
blob8420140d37dd9f2943bb086768c0b0f158f01872
1 <!DOCTYPE html>
2 <html>
3 <body onload="test();">
5 <input id="input-box"></input>
6 <embed id="plugin" type="application/x-webkit-test-webplugin" supports-keyboard-focus="true" contentEditable="false"></embed>
7 <script>
9 function focusPluginByTabKeypress() {
10 var inputBox = document.getElementById('input-box');
11 inputBox.focus();
12 eventSender.keyDown('\t');
15 var seenKeyup = false;
16 function onKeyup(e) {
17 if (!seenKeyup) {
18 seenKeyup = true;
19 // Change focus one more time to make sure we don't see any keypress events.
20 focusPluginByTabKeypress();
21 } else {
22 testRunner.notifyDone();
26 function onKeypress(e) {
27 console.log('FAIL: Unexpected keypress event');
28 testRunner.notifyDone();
31 function test() {
32 if (!window.testRunner || !window.eventSender) {
33 document.write("This test does not work in manual mode.");
34 } else {
35 testRunner.waitUntilDone();
36 testRunner.dumpAsText();
38 // We will press tab to move the focus from <input> to the plugin.
39 // We verify that the plugin only sees keyup events, not any keypress.
40 var plugin = document.getElementById('plugin');
41 plugin.onkeyup = onKeyup;
42 plugin.onkeypress = onKeypress;
43 focusPluginByTabKeypress();
46 </script>
47 </body>
48 </html>