| 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>
|
|
|