OLD | NEW |
---|---|
(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> | |
OLD | NEW |