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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/menu-key-context-menu-position.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 years, 5 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 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <script src="../dom/resources/event-sender-util.js"></script> 3 <script src="../dom/resources/event-sender-util.js"></script>
4 <script> 4 <script>
5 var inputNode; 5 var inputNode;
6 var X,Y; 6 var X,Y;
7 var event; 7 var event;
8 description('Verifies that when element is focused in frames then selection'+ 8 description('Verifies that when element is focused in frames then selection'+
9 ' by menu key, context menu should come on focused element. Succeeds if '+ 9 ' by menu key, context menu should come on focused element. Succeeds if '+
10 'context menu is coming on the focused element and event co-ordinates are'+ 10 'context menu is coming on the focused element and event co-ordinates are'+
11 ' at center of the elements bounding box.'); 11 ' at center of the elements bounding box.');
12 function onEventInFrame(e) { 12 function onEventInFrame(e) {
13 event = e; 13 event = e;
14 shouldBe("event.target", "inputNode"); 14 shouldBe("event.target", "inputNode");
15 shouldBe("event.clientX", "X"); 15 shouldBe("event.clientX", "X");
16 shouldBe("event.clientY", "Y"); 16 shouldBe("event.clientY", "Y");
17 } 17 }
18 function runTest() { 18 function runTest() {
19 if (window.testRunner) 19 if (window.testRunner)
20 testRunner.dumpAsText(); 20 testRunner.dumpAsText();
21 if (!window.eventSender) 21 if (!window.eventSender)
22 return; 22 return;
23 inputNode = frames[0].document.getElementById("ex1"); 23 inputNode = frames[0].document.getElementById("ex1");
24 var r = inputNode.getBoundingClientRect(); 24 var r = inputNode.getBoundingClientRect();
25 X = (r.left + r.right) / 2 25 X = (r.left + r.right) / 2
26 Y = (r.top + r.bottom) / 2; 26 Y = (r.top + r.bottom) / 2;
27 inputNode.focus(); 27 inputNode.focus();
28 eventSender.keyDown("menu"); 28 eventSender.keyDown("ContextMenu");
29 } 29 }
30 </script> 30 </script>
31 <iframe id="myframe" style="margin-top:50px" onload="runTest()" src="resources/m enu-key-context-menu-position-frame.html"><iframe> 31 <iframe id="myframe" style="margin-top:50px" onload="runTest()" src="resources/m enu-key-context-menu-position-frame.html"><iframe>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698