| Index: LayoutTests/fast/events/wheelevent-mousewheel-interaction.html
|
| diff --git a/LayoutTests/fast/events/wheelevent-mousewheel-interaction.html b/LayoutTests/fast/events/wheelevent-mousewheel-interaction.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..687caef6d8d28ce3bb618a717e40fcb1cce2d0b6
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/events/wheelevent-mousewheel-interaction.html
|
| @@ -0,0 +1,55 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEvent">
|
| +<script src="../js/resources/js-test-pre.js"></script>
|
| +<script>
|
| +function runTest() {
|
| + var div = document.getElementById('target');
|
| + div.addEventListener('wheel', wheelHandler);
|
| + div.addEventListener('mousewheel', mouseWheelHandler);
|
| + if (window.eventSender) {
|
| + eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5);
|
| + eventSender.mouseScrollBy(10, 20);
|
| + finishJSTest();
|
| + } else {
|
| + debug("FAIL: This test requires window.eventSender.");
|
| + finishJSTest();
|
| + }
|
| +}
|
| +
|
| +var testEvent;
|
| +function wheelHandler(e) {
|
| + testEvent = e;
|
| + testPassed("Standard wheel event was fired.");
|
| + shouldBe("testEvent.__proto__", "WheelEvent.prototype");
|
| +}
|
| +
|
| +function mouseWheelHandler(e) {
|
| + testFailed("mousewheel event should not have fired.");
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +<body>
|
| +<span id="parent">
|
| + <div id="target" style="border:solid 1px green; width:220px; height:70px; overflow:scroll">
|
| + TOP TOP TOP TOP TOP TOP TOP
|
| + Scroll mouse wheel over here
|
| + Scroll mouse wheel over here
|
| + Scroll mouse wheel over here
|
| + Scroll mouse wheel over here
|
| + Scroll mouse wheel over here
|
| + Scroll mouse wheel over here
|
| + END END END END END END END
|
| + </div>
|
| +</span>
|
| +<script>
|
| +description("Tests the interaction between the standard 'wheel' event and the non-standard 'mousewheel' one");
|
| +window.jsTestIsAsync = true;
|
| +
|
| +runTest();
|
| +</script>
|
| +<script src="../js/resources/js-test-post.js"></script>
|
| +</body>
|
| +</html>
|
|
|