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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/NeverFixTests ('k') | LayoutTests/fast/events/menu-key-context-menu-position-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/menu-key-context-menu-position.html
diff --git a/LayoutTests/fast/events/menu-key-context-menu-position.html b/LayoutTests/fast/events/menu-key-context-menu-position.html
new file mode 100644
index 0000000000000000000000000000000000000000..13985a7aed44ad11455b449d4387516e26f80f9f
--- /dev/null
+++ b/LayoutTests/fast/events/menu-key-context-menu-position.html
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML>
+<html>
+<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.
+<script>
+ var count = 0;
+ var anchorNode;
+ var x,y;
+ function onEventInFrame(e) {
+ count++;
+ if(count === 2) {
+ 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
+ alert("PASS");
+ else
+ alert("FAIL");
+ }
+ return false;
+ }
+ function runTest() {
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ if (!window.eventSender)
+ return;
+ anchorNode = frames[1].document.getElementById("ex1");
+ var r = anchorNode.getBoundingClientRect();
+ x = (r.left + r.right) / 2
+ y = (r.top + r.bottom) / 2;
+ anchorNode.focus();
+ eventSender.keyDown("menu");
+ // 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.
+ eventSender.keyDown("escape");
+ eventSender.keyDown("menu");
+}
+</script>
+</head>
+
+<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
+<frame src="resources/window-opened.html">
+<frame id="myframe" src="resources/menu-key-context-menu-position-frame.html">
+</frameset>
+
+</html>
« 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