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

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

Issue 429803002: Revert of 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 eventInit = { deltaX: -deltaX, deltaY: -deltaY }; 3 var event = document.createEvent('WheelEvent');
4 var event = new WheelEvent('mousewheel', eventInit); 4 var dontCare = 0;
5 event.initWebKitWheelEvent(deltaX, deltaY, document.defaultView, dontCare, d ontCare, dontCare, dontCare, false, false, false, false);
5 element.dispatchEvent(event); 6 element.dispatchEvent(event);
6 } 7 }
7 8
8 var input; 9 var input;
9 function testWheelEvent(parameters) 10 function testWheelEvent(parameters)
10 { 11 {
11 var inputType = parameters['inputType']; 12 var inputType = parameters['inputType'];
12 var initialValue = parameters['initialValue']; 13 var initialValue = parameters['initialValue'];
13 var stepUpValue1 = parameters['stepUpValue1']; 14 var stepUpValue1 = parameters['stepUpValue1'];
14 var stepUpValue2 = parameters['stepUpValue2']; 15 var stepUpValue2 = parameters['stepUpValue2'];
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 shouldBeEqualToString('input.value', initialValue); 49 shouldBeEqualToString('input.value', initialValue);
49 input.readOnly = false; 50 input.readOnly = false;
50 51
51 debug('No focus:'); 52 debug('No focus:');
52 document.getElementById('another').focus(); 53 document.getElementById('another').focus();
53 dispatchWheelEvent(input, 0, 1); 54 dispatchWheelEvent(input, 0, 1);
54 shouldBeEqualToString('input.value', initialValue); 55 shouldBeEqualToString('input.value', initialValue);
55 56
56 parent.parentNode.removeChild(parent); 57 parent.parentNode.removeChild(parent);
57 } 58 }
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