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

Unified Diff: LayoutTests/fast/events/event-hit-testing-fallback-to-iframe.html

Issue 1289753006: Fallback to root layer if hit-testing does not hit anything in iframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove "active" hack for wheel event hit-test & using document.documentElement.scrollTop for scroll… Created 5 years, 4 months 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
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>

Powered by Google App Engine
This is Rietveld 408576698