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

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

Issue 766143002: Fix contextmenu event location for menu key in an iframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding failure case for mac, as mac does not have menu key. Created 5 years, 11 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
(Empty)
1 <!DOCTYPE HTML>
2 <script src="../../resources/js-test.js"></script>
3 <script src="../dom/resources/event-sender-util.js"></script>
4 <script>
5 var inputNode;
6 var X,Y;
7 var event;
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 '+
10 'context menu is coming on the focused element and event co-ordinates are'+
11 ' at center of the elements bounding box.');
12 function onEventInFrame(e) {
13 event = e;
14 shouldBe("event.target", "inputNode");
15 shouldBe("event.clientX", "X");
16 shouldBe("event.clientY", "Y");
17 }
18 function runTest() {
19 if (window.testRunner)
20 testRunner.dumpAsText();
21 if (!window.eventSender)
22 return;
23 inputNode = frames[0].document.getElementById("ex1");
24 var r = inputNode.getBoundingClientRect();
25 X = (r.left + r.right) / 2
26 Y = (r.top + r.bottom) / 2;
27 inputNode.focus();
28 eventSender.keyDown("menu");
29 }
30 </script>
31 <iframe id="myframe" style="margin-top:50px" onload="runTest()" src="resources/m enu-key-context-menu-position-frame.html"><iframe>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/events/menu-key-context-menu-position-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698