| Index: LayoutTests/fast/events/event-hit-testing-fallback-to-iframe.html
|
| diff --git a/LayoutTests/fast/events/event-hit-testing-fallback-to-iframe.html b/LayoutTests/fast/events/event-hit-testing-fallback-to-iframe.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..977c2cf66c36bbb588b1c08e504891e7c93f4384
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/events/event-hit-testing-fallback-to-iframe.html
|
| @@ -0,0 +1,48 @@
|
| +<!DOCTYPE html>
|
| +
|
| +<body>
|
| + <iframe src="resources/body-overflow-iframe.html" height="100px"></iframe>
|
| + <div id='console'></div>
|
| +</body>
|
| +
|
| +<script src="../../resources/js-test.js"></script>
|
| +<script>
|
| +description("Test that when the hit test of input event in an iframe does not hit " +
|
| + "anything (not even the html/body), the input event is still captured " +
|
| + "the iframe's document")
|
| +
|
| +document.addEventListener("contextmenu", function(){
|
| + debug("FAIL context_menu_triggered in main frame");
|
| +});
|
| +
|
| +document.addEventListener("click", function(){
|
| + debug("FAIL click_triggered in main frame");
|
| +});
|
| +
|
| +if (!window.eventSender) {
|
| + testFailed('window.eventSender is required for this test.');
|
| +}
|
| +
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +window.addEventListener("message", function(evt) {
|
| + if (evt.data == "subframe-loaded") {
|
| + // Tap and left/right click in the iframe that does not hit the body
|
| + // and the child div but should still be dispatched to the iframe's
|
| + // document element.
|
| + eventSender.gestureTap(100, 50);
|
| + eventSender.mouseMoveTo(100, 50);
|
| + eventSender.mouseDown(1);
|
| + eventSender.mouseUp(1);
|
| + eventSender.mouseDown(2);
|
| + eventSender.mouseUp(2);
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + }
|
| +
|
| +}, true);
|
| +
|
| +</script>
|
|
|