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

Side by Side Diff: LayoutTests/platform/win/fast/events/keydown-menu-key.html

Issue 232573002: Deliver Menu key event after sending context menu event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix for Layout test failure on windows Created 6 years, 8 months 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 <html> 1 <html>
2 <head> 2 <head>
3 <title>Event Test (Sending function-key events)</title> 3 <title>Event Test (Sending Menu-key event)</title>
4 <script language="javascript" type="text/javascript"> 4 <script language="javascript" type="text/javascript">
5 function log(str) { 5 function log(str) {
6 var li = document.createElement("li"); 6 var li = document.createElement("li");
7 li.appendChild(document.createTextNode(str)); 7 li.appendChild(document.createTextNode(str));
8 var console = document.getElementById("console"); 8 var console = document.getElementById("console");
9 console.appendChild(li); 9 console.appendChild(li);
10 } 10 }
11 function onKeyEvent(ev) { 11 function onKeyEvent(ev) {
12 ev = ev || event; 12 ev = ev || event;
13 log('Type=' + ev.type + ',' + 13 log('Type=' + ev.type + ',' +
14 'keyCode=' + (ev.which || ev.keyCode) + ',' + 14 'keyCode=' + (ev.which || ev.keyCode) + ',' +
15 'ctrlKey=' + ev.ctrlKey + ',' + 15 'ctrlKey=' + ev.ctrlKey + ',' +
16 'shiftKey=' + ev.shiftKey + ',' + 16 'shiftKey=' + ev.shiftKey + ',' +
17 'altKey=' + ev.altKey + ',' + 17 'altKey=' + ev.altKey + ',' +
18 'metaKey=' + ev.metaKey); 18 'metaKey=' + ev.metaKey);
19 } 19 }
20 </script> 20 </script>
21 </head> 21 </head>
22 <body> 22 <body>
23 <p>This test verifies the keycodes sent when we press function keys.</p> 23 <p>This test verifies the keycode sent when we press Menu key.
24 <textarea id="test" rows="1" cols="40" onkeydown="return onKeyEvent(event);" onk eyup="return onKeyEvent(event);"></textarea> 24 This test applies only to Linux and Windows.</p>
25 <textarea id="test" rows="1" cols="40" onkeydown="return onKeyEvent(event);"
26 onkeyup="return onKeyEvent(event);" oncontextmenu="return onKeyEvent(event);"></ textarea>
25 <ul id="console"></ul> 27 <ul id="console"></ul>
26 <script language="javascript" type="text/javascript"> 28 <script language="javascript" type="text/javascript">
27 if (window.testRunner) 29 if (window.testRunner)
28 window.testRunner.dumpAsText(); 30 window.testRunner.dumpAsText();
29 var textarea = document.getElementById("test"); 31 var textarea = document.getElementById("test");
30 textarea.focus(); 32 textarea.focus();
31 eventSender.keyDown("F1"); 33 eventSender.keyDown("menu");
32 eventSender.keyDown("F2");
33 eventSender.keyDown("F3");
34 eventSender.keyDown("F4");
35 eventSender.keyDown("F5");
36 eventSender.keyDown("F6");
37 eventSender.keyDown("F7");
38 eventSender.keyDown("F8");
39 eventSender.keyDown("F9");
40 eventSender.keyDown("F10");
41 eventSender.keyDown("F11");
42 eventSender.keyDown("F12");
43 </script> 34 </script>
44 </body> 35 </body>
45 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698