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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/iframe-mousewheel.html

Issue 1731353003: Prevent propagation of wheel events to dispatch event in parent iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/iframe-mousewheel-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/iframe-mousewheel.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/iframe-onmousemove.html b/third_party/WebKit/LayoutTests/fast/events/iframe-mousewheel.html
similarity index 55%
copy from third_party/WebKit/LayoutTests/fast/events/iframe-onmousemove.html
copy to third_party/WebKit/LayoutTests/fast/events/iframe-mousewheel.html
index e79164b5989a34df6b053ccdbc4951dde312a7ba..fee21ff31fb6b523c5c7d57efe66a4fd739db4e5 100644
--- a/third_party/WebKit/LayoutTests/fast/events/iframe-onmousemove.html
+++ b/third_party/WebKit/LayoutTests/fast/events/iframe-mousewheel.html
@@ -1,19 +1,32 @@
-<html>
-<head>
<script src="../../resources/js-test.js"></script>
+<p id="description"></p>
+<iframe id="frame" src="resources/iframe-mousewheel.html"></iframe>
+<div id="console"></div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
var testFinished = false;
-function done()
+description("This test can be used to verify that a mousewheel event is fired when wheeling over the subframe but not dispatched to the parent frame.");
+
+document.addEventListener("wheel", function() {
+ testFailed("Received wheel event in parent");
+ if (window.testRunner)
+ testRunner.notifyDone();
+});
+
+function iframeMouseWheel()
{
if (testFinished)
return;
testFinished = true;
- testPassed("received mousemove event.");
- debug('<br /><span class="pass">TEST COMPLETE</span>');
+ setTimeout(done, 0);
+}
+
+function done()
+{
+ testPassed("received mousewheel event.");
if (window.testRunner)
testRunner.notifyDone();
}
@@ -27,17 +40,8 @@ function runTest()
var centerX = frame.offsetLeft + frame.offsetWidth / 2;
var centerY = frame.offsetTop + frame.offsetHeight / 2;
eventSender.mouseMoveTo(centerX, centerY);
+ eventSender.mouseScrollBy(0, 53);
}
window.onload = runTest;
</script>
-</head>
-<body>
-<p id="description"></p>
-<iframe id="frame" src="resources/iframe-onmousemove.html"></iframe>
-<div id="console"></div>
-<script>
- description("This test can be used to verify that a mousemove event is fired when moving the mouse cursor over an element in a subframe.");
-</script>
-</body>
-</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/iframe-mousewheel-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698