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

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

Issue 2928793003: Re-target wheel events only when a new scroll sequence has started. (Closed)
Patch Set: review comments addressed. Created 3 years, 6 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEven t"> 4 <link rel="help" href="http://www.w3.org/TR/DOM-Level-3-Events/#events-WheelEven t">
5 <script src="../../../resources/js-test.js"></script> 5 <script src="../../../resources/js-test.js"></script>
6 <script> 6 <script>
7 function runTest() { 7 function runTest() {
8 var div = document.getElementById('target'); 8 var div = document.getElementById('target');
9 div.addEventListener('wheel', wheelHandler); 9 div.addEventListener('wheel', wheelHandler);
10 div.addEventListener('mousewheel', mouseWheelHandler); 10 div.addEventListener('mousewheel', mouseWheelHandler);
11 if (window.eventSender) { 11 if (window.eventSender) {
12 eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5); 12 eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5);
13 eventSender.mouseScrollBy(10, 20); 13 eventSender.mouseScrollBy(10, 20, false, true, 0, true, "phaseBegan");
14 finishJSTest(); 14 finishJSTest();
15 } else { 15 } else {
16 debug("FAIL: This test requires window.eventSender."); 16 debug("FAIL: This test requires window.eventSender.");
17 finishJSTest(); 17 finishJSTest();
18 } 18 }
19 } 19 }
20 20
21 var testEvent; 21 var testEvent;
22 function wheelHandler(e) { 22 function wheelHandler(e) {
23 testEvent = e; 23 testEvent = e;
(...skipping 21 matching lines...) Expand all
45 </div> 45 </div>
46 </span> 46 </span>
47 <script> 47 <script>
48 description("Tests the interaction between the standard 'wheel' event and the no n-standard 'mousewheel' one"); 48 description("Tests the interaction between the standard 'wheel' event and the no n-standard 'mousewheel' one");
49 window.jsTestIsAsync = true; 49 window.jsTestIsAsync = true;
50 50
51 runTest(); 51 runTest();
52 </script> 52 </script>
53 </body> 53 </body>
54 </html> 54 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698