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

Side by Side Diff: LayoutTests/fast/events/wheelevent-mousewheel-interaction.html

Issue 22859012: Add support for DOM Level 3 WheelEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename prefixedType() to legacyType() Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEven t">
5 <script src="../js/resources/js-test-pre.js"></script>
6 <script>
7 function runTest() {
8 var div = document.getElementById('target');
9 div.addEventListener('wheel', wheelHandler);
10 div.addEventListener('mousewheel', mouseWheelHandler);
11 if (window.eventSender) {
12 eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5);
13 eventSender.mouseScrollBy(10, 20);
14 finishJSTest();
15 } else {
16 debug("FAIL: This test requires window.eventSender.");
17 finishJSTest();
18 }
19 }
20
21 var testEvent;
22 function wheelHandler(e) {
23 testEvent = e;
24 testPassed("Standard wheel event was fired.");
25 shouldBe("testEvent.__proto__", "WheelEvent.prototype");
26 }
27
28 function mouseWheelHandler(e) {
29 testFailed("mousewheel event should not have fired.");
30 }
31
32 </script>
33 </head>
34 <body>
35 <span id="parent">
36 <div id="target" style="border:solid 1px green; width:220px; height:70px; ov erflow:scroll">
37 TOP TOP TOP TOP TOP TOP TOP
38 Scroll mouse wheel over here
39 Scroll mouse wheel over here
40 Scroll mouse wheel over here
41 Scroll mouse wheel over here
42 Scroll mouse wheel over here
43 Scroll mouse wheel over here
44 END END END END END END END
45 </div>
46 </span>
47 <script>
48 description("Tests the interaction between the standard 'wheel' event and the no n-standard 'mousewheel' one");
49 window.jsTestIsAsync = true;
50
51 runTest();
52 </script>
53 <script src="../js/resources/js-test-post.js"></script>
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698