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

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: Added description of testcase. Created 6 years 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 <body>
3 <script src="../../resources/js-test.js"></script>
4 <script src="../dom/resources/event-sender-util.js"></script>
5 <script>
6 var anchorNode;
7 var x,y;
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 shouldBe(e.target, anchorNode);
Rick Byers 2015/01/05 18:16:24 shouldBe takes expression strings to be evaluated,
Deepak 2015/01/06 13:27:02 Earlier the issue is we can not use frameset insid
14 shouldBe(e.clientX, x);
15 shouldBe(e.clientY, y);
16 }
17 function runTest() {
18 if (window.testRunner)
19 testRunner.dumpAsText();
20 if (!window.eventSender)
21 return;
22 anchorNode = frames[1].document.getElementById("ex1");
23 var r = anchorNode.getBoundingClientRect();
24 x = (r.left + r.right) / 2
25 y = (r.top + r.bottom) / 2;
26 anchorNode.focus();
27 eventSender.keyDown("menu");
28 }
29 </script>
30 <frameset rows="30%,40%" onload="runTest()">
31 <frame src="resources/window-opened.html">
32 <frame id="myframe" src="resources/menu-key-context-menu-position-frame.html">
33 </frameset>
34 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698