OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../fast/js/resources/js-test-pre.js"></script> |
5 <script> | 5 <script> |
6 var clicked = false; | 6 var clicked = false; |
7 | 7 |
8 function handleClicked() | 8 function handleClicked() |
9 { | 9 { |
10 clicked = true; | 10 clicked = true; |
11 } | 11 } |
12 | 12 |
13 function test() | 13 function test() |
14 { | 14 { |
15 description("This test passes if it doesn't crash and the context menu is sh
own for the search input"); | 15 description("This test passes if it doesn't crash and the context menu is sh
own for the search input"); |
16 if (!window.eventSender) | 16 if (!window.eventSender) |
17 return; | 17 return; |
18 var target = document.getElementById("target"); | 18 var target = document.getElementById("target"); |
19 var clickX = target.offsetLeft + target.offsetWidth - 2; | 19 var clickX = target.offsetLeft + target.offsetWidth - 2; |
20 var clickY = target.offsetTop + target.offsetHeight / 2; | 20 var clickY = target.offsetTop + target.offsetHeight / 2; |
21 eventSender.mouseMoveTo(clickX, clickY); | 21 eventSender.mouseMoveTo(clickX, clickY); |
22 eventSender.contextClick(); | 22 eventSender.contextClick(); |
23 shouldBe("clicked", "true"); | 23 shouldBe("clicked", "true"); |
24 } | 24 } |
25 </script> | 25 </script> |
26 </head> | 26 </head> |
27 <body onload="test();"> | 27 <body> |
28 <p id="description"></p> | 28 <p id="description"></p> |
29 <div id="console"></div> | 29 <div id="console"></div> |
30 <input id="target" type="search" oncontextmenu="handleClicked()"> | 30 <input id="target" type="search" oncontextmenu="handleClicked()"> |
| 31 <script>test();</script> |
31 <script src="../../fast/js/resources/js-test-post.js"></script> | 32 <script src="../../fast/js/resources/js-test-post.js"></script> |
32 </body> | 33 </body> |
33 </html> | 34 </html> |
OLD | NEW |