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

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: changing test case. 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, clientX, clientY;
7 description('Verifies that when element is focused in frames then selection'+
8 ' by menu key, context menu should come on focused element. Succeeds if '+
9 'context menu is coming on the focused element and event co-ordinates are'+
10 ' at center of the elements bounding box.');
11 function onEventInFrame(event) {
12 shouldBe(event.target.id, 'inputNode');
Rick Byers 2015/01/07 16:57:34 this should be a string as well. Remember the arg
Deepak 2015/01/08 10:11:28 Done.
Deepak 2015/01/08 10:11:29 Done.
13 clientX = event.clientX;
14 clientY = event.clientY;
15 shouldBe("clientX","X");
16 shouldBe("clientY","Y");
17 }
18 function runTest() {
19 if (window.testRunner)
20 testRunner.dumpAsText();
21 if (!window.eventSender)
22 return;
23 inputNode = frames[1].document.getElementById("inputNode");
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 <body>
Rick Byers 2015/01/07 16:57:34 nit: no need for a body tag: http://www.chromium.o
Deepak 2015/01/08 10:11:29 Done.
32 <iframe src="resources/window-opened.html"></iframe>
Rick Byers 2015/01/07 16:57:34 what is this other iframe for? You can probably r
Deepak 2015/01/08 10:11:28 Done.
33 <iframe id="myframe" style="margin-top:50px" onload="runTest()" src="resources /menu-key-context-menu-position-frame.html"><iframe>
34 </body>
OLDNEW
« no previous file with comments | « LayoutTests/NeverFixTests ('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