Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Side by Side Diff: third_party/WebKit/LayoutTests/plugins/keyboard-events.html

Issue 1480303002: Implement a basic PPAPI plugin for Blink layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android after https://codereview.chromium.org/1478633002 Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html>
1 <html> 2 <html>
2 <body> 3 <head>
3 <embed name="plg" type="application/x-webkit-test-netscape" windowedPlugin="fals e" width=100 height=100></embed> 4 <script src="../resources/plugin.js"></script>
4 <p>This test checks if a plugin can receive keyboard events sent from eventSende r. This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34936">Bu g 34936</a>.</p>
5 <script> 5 <script>
6 6 startAfterLoadAndFinish(function () {
7 plg.windowedPlugin = false;
8 plg.eventLoggingEnabled = true;
9
10 if (!window.testRunner) { 7 if (!window.testRunner) {
11 document.write("This test does not work in manual mode."); 8 document.body.appendChild(document.createTextNode("This test does not wo rk in manual mode."));
12 } else { 9 return;
13 testRunner.dumpAsText();
14
15 // Send a mouse-click event to set the input focus to the test plugin.
16 eventSender.mouseMoveTo(0,0);
17 eventSender.mouseMoveTo(20,20);
18 eventSender.mouseDown();
19 eventSender.mouseUp();
20
21 // Send keyboard events to the plugin.
22 eventSender.keyDown('a');
23 eventSender.keyDown('b');
24 eventSender.keyDown('c');
25 } 10 }
26 11
27 plg.eventLoggingEnabled = false; // stop logging so our output doesn't bleed into the next test 12 testRunner.dumpAsText();
28 13
14 // Send a mouse-click event to set the input focus to the test plugin.
15 eventSender.mouseMoveTo(0,0);
16 eventSender.mouseMoveTo(20,20);
17 eventSender.mouseDown();
18 eventSender.mouseUp();
19
20 // Send keyboard events to the plugin.
21 eventSender.keyDown('a');
22 eventSender.keyDown('b');
23 eventSender.keyDown('c');
24 });
29 </script> 25 </script>
26 </head>
27 <body>
28 <embed type="application/x-blink-test-plugin" width=100 height=100></embed>
29 <p>This test checks if a plugin can receive keyboard events sent from eventSende r. This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34936">Bu g 34936</a>.</p>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698