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

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: 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 <html>
3 <head>
Rick Byers 2014/12/19 15:14:27 Nit: omit html and head tags. See http://www.chro
Deepak 2014/12/20 09:35:33 Done.
4 <script>
5 var count = 0;
6 var anchorNode;
7 var x,y;
8 function onEventInFrame(e) {
9 count++;
10 if(count === 2) {
11 if (e.target == anchorNode && e.clientX === x && e.clientY === y)
Rick Byers 2014/12/19 15:14:27 this is what the 'shouldBe' helpers are for in js-
Deepak 2014/12/20 09:35:33 I have tried to use description() but I am not abl
12 alert("PASS");
13 else
14 alert("FAIL");
15 }
16 return false;
17 }
18 function runTest() {
19 if (window.testRunner)
20 testRunner.dumpAsText();
21 if (!window.eventSender)
22 return;
23 anchorNode = frames[1].document.getElementById("ex1");
24 var r = anchorNode.getBoundingClientRect();
25 x = (r.left + r.right) / 2
26 y = (r.top + r.bottom) / 2;
27 anchorNode.focus();
28 eventSender.keyDown("menu");
29 // Esc key to hide context menu
Rick Byers 2014/12/19 15:14:27 Any reason to do this twice? I'd suggest removing
Deepak 2014/12/20 09:35:33 Done.
30 eventSender.keyDown("escape");
31 eventSender.keyDown("menu");
32 }
33 </script>
34 </head>
35
36 <frameset rows="30%,40%" onload="runTest()">
Rick Byers 2014/12/19 15:14:27 perhaps the frameset is necessary just to get "myf
Deepak 2014/12/20 09:35:33 I am getting uncaught reference error like below
37 <frame src="resources/window-opened.html">
38 <frame id="myframe" src="resources/menu-key-context-menu-position-frame.html">
39 </frameset>
40
41 </html>
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