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

Side by Side Diff: LayoutTests/fast/forms/resources/common-wheel-event.js

Issue 426123004: Reland "Remove WheelEvent.initWebKitWheelEvent()" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
1 function dispatchWheelEvent(element, deltaX, deltaY) 1 function dispatchWheelEvent(element, deltaX, deltaY)
2 { 2 {
3 var event = document.createEvent('WheelEvent'); 3 var eventInit = { deltaX: -deltaX, deltaY: -deltaY };
4 var dontCare = 0; 4 var event = new WheelEvent('mousewheel', eventInit);
5 event.initWebKitWheelEvent(deltaX, deltaY, document.defaultView, dontCare, d ontCare, dontCare, dontCare, false, false, false, false);
6 element.dispatchEvent(event); 5 element.dispatchEvent(event);
7 } 6 }
8 7
9 var input; 8 var input;
10 function testWheelEvent(parameters) 9 function testWheelEvent(parameters)
11 { 10 {
12 var inputType = parameters['inputType']; 11 var inputType = parameters['inputType'];
13 var initialValue = parameters['initialValue']; 12 var initialValue = parameters['initialValue'];
14 var stepUpValue1 = parameters['stepUpValue1']; 13 var stepUpValue1 = parameters['stepUpValue1'];
15 var stepUpValue2 = parameters['stepUpValue2']; 14 var stepUpValue2 = parameters['stepUpValue2'];
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 shouldBeEqualToString('input.value', initialValue); 48 shouldBeEqualToString('input.value', initialValue);
50 input.readOnly = false; 49 input.readOnly = false;
51 50
52 debug('No focus:'); 51 debug('No focus:');
53 document.getElementById('another').focus(); 52 document.getElementById('another').focus();
54 dispatchWheelEvent(input, 0, 1); 53 dispatchWheelEvent(input, 0, 1);
55 shouldBeEqualToString('input.value', initialValue); 54 shouldBeEqualToString('input.value', initialValue);
56 55
57 parent.parentNode.removeChild(parent); 56 parent.parentNode.removeChild(parent);
58 } 57 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/wheelevent-in-scrolling-div-expected.txt ('k') | Source/core/events/WheelEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698