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

Side by Side Diff: LayoutTests/fast/events/menu-key-context-menu-document.html

Issue 484353004: Test tidying: use "escape" and "backspace" with eventSender.keyDown() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More quoting consistency wibbles Created 6 years, 4 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script src="../dom/resources/event-sender-util.js"></script> 4 <script src="../dom/resources/event-sender-util.js"></script>
5 <style> 5 <style>
6 #anchor { 6 #anchor {
7 background-color: orange; 7 background-color: orange;
8 height: 100px; 8 height: 100px;
9 margin: 10px; 9 margin: 10px;
10 width: 100px; 10 width: 100px;
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 document.addEventListener('contextmenu', handleContextMenu, true); 26 document.addEventListener('contextmenu', handleContextMenu, true);
27 27
28 if (!window.eventSender || !window.testRunner) { 28 if (!window.eventSender || !window.testRunner) {
29 testFailed('This test needs to run in a test environment.'); 29 testFailed('This test needs to run in a test environment.');
30 } else { 30 } else {
31 var anchor = document.getElementById("anchor"); 31 var anchor = document.getElementById("anchor");
32 mouseMoveToElem(anchor); 32 mouseMoveToElem(anchor);
33 eventSender.contextClick(); 33 eventSender.contextClick();
34 // Esc key to hide context menu 34 // Esc key to hide context menu
35 eventSender.keyDown(String.fromCharCode(0x001B)); 35 eventSender.keyDown("escape");
36 anchor.focus(); 36 anchor.focus();
37 eventSender.keyDown("menu"); 37 eventSender.keyDown("menu");
38 } 38 }
39 </script> 39 </script>
40 </body> 40 </body>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/menu-key-context-menu.html ('k') | LayoutTests/fast/events/special-key-events-in-input-text.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698