OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 |
| 3 <body> |
| 4 <iframe src="resources/body-overflow-iframe.html" height="100px"></iframe> |
| 5 <div id='console'></div> |
| 6 </body> |
| 7 |
| 8 <script src="../../resources/js-test.js"></script> |
| 9 <script> |
| 10 description("Test that when the hit test of input event in an iframe does not hi
t " + |
| 11 "anything (not even the html/body), the input event is still capture
d " + |
| 12 "the iframe's document") |
| 13 |
| 14 document.addEventListener("contextmenu", function(){ |
| 15 debug("FAIL context_menu_triggered in main frame"); |
| 16 }); |
| 17 |
| 18 if (!window.eventSender) { |
| 19 testFailed('window.eventSender is required for this test.'); |
| 20 } |
| 21 |
| 22 if (window.testRunner) { |
| 23 testRunner.dumpAsText(); |
| 24 testRunner.waitUntilDone(); |
| 25 } |
| 26 |
| 27 window.addEventListener("message", function(evt) { |
| 28 if (evt.data == "subframe-loaded") { |
| 29 // Right click in the iframe that does not hit the body |
| 30 // and the child div. The contextmenu event should still |
| 31 // be triggered in the iframe. |
| 32 eventSender.mouseMoveTo(100, 50); |
| 33 eventSender.mouseDown(2); |
| 34 eventSender.mouseUp(2); |
| 35 if (window.testRunner) |
| 36 testRunner.notifyDone(); |
| 37 } |
| 38 |
| 39 }, true); |
| 40 |
| 41 </script> |
OLD | NEW |