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

Side by Side Diff: LayoutTests/fast/events/menu-key-context-menu.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 <html> 1 <html>
2 <head> 2 <head>
3 <title> 3 <title>
4 Test for contextmenu event target 4 Test for contextmenu event target
5 </title> 5 </title>
6 </head> 6 </head>
7 <body onload="test()"> 7 <body onload="test()">
8 <p>This test checks if contextmenu event target is correct when triggered from m enu key.</p> 8 <p>This test checks if contextmenu event target is correct when triggered from m enu key.</p>
9 <a href="" id="anchor" oncontextmenu="handleContextMenu(event);">Test</a> 9 <a href="" id="anchor" oncontextmenu="handleContextMenu(event);">Test</a>
10 <div id="result">FAIL</div> 10 <div id="result">FAIL</div>
(...skipping 14 matching lines...) Expand all
25 return; 25 return;
26 26
27 var anchor = document.getElementById("anchor"); 27 var anchor = document.getElementById("anchor");
28 28
29 var r = anchor.getBoundingClientRect(); 29 var r = anchor.getBoundingClientRect();
30 var x = (r.left + r.right) / 2 30 var x = (r.left + r.right) / 2
31 var y = (r.top + r.bottom) / 2; 31 var y = (r.top + r.bottom) / 2;
32 eventSender.mouseMoveTo(x, y); 32 eventSender.mouseMoveTo(x, y);
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 } 39 }
40 </script> 40 </script>
41 </body> 41 </body>
42 </html> 42 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/key-events-in-input-text.html ('k') | LayoutTests/fast/events/menu-key-context-menu-document.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698