Chromium Code Reviews| Index: LayoutTests/fast/events/touch/gesture/pad-gesture-fling.js |
| diff --git a/LayoutTests/fast/events/touch/gesture/pad-gesture-fling.js b/LayoutTests/fast/events/touch/gesture/pad-gesture-fling.js |
| index 7057c45cae334fdcdeea4d4371c2ff47fdfa6a2b..dffecf03f6ed5b68a0054ae2514cbc98c21aca92 100644 |
| --- a/LayoutTests/fast/events/touch/gesture/pad-gesture-fling.js |
| +++ b/LayoutTests/fast/events/touch/gesture/pad-gesture-fling.js |
| @@ -4,9 +4,9 @@ var actualWheelEventsOccurred = 0; |
| var cumulativeScrollX = 0; |
| var cumulativeScrollY = 0; |
| -var minimumWheelEventsExpected = 40; |
| -var minimumScrollXExpected = "200"; |
| -var minimumScrollYExpected = "200"; |
| +var maximumWheelEventsExpected = 500; |
| +var minimumScrollXExpected = 300; |
| +var minimumScrollYExpected = 300; |
| var positionX = 10; |
| var positionY = 11; |
| @@ -25,14 +25,19 @@ function recordWheelEvent(event) |
| cumulativeScrollX += event.wheelDeltaX; |
| cumulativeScrollY += event.wheelDeltaY; |
| - if (actualWheelEventsOccurred == minimumWheelEventsExpected) { |
| - shouldBeGreaterThanOrEqual('cumulativeScrollX', minimumScrollXExpected); |
| - shouldBeGreaterThanOrEqual('cumulativeScrollY', minimumScrollYExpected); |
| + if (actualWheelEventsOccurred == maximumWheelEventsExpected |
| + || (cumulativeScrollX >= minimumScrollXExpected |
| + && cumulativeScrollY >= minimumScrollYExpected |
| + && actualWheelEventsOccurred < maximumWheelEventsExpected)) { |
|
bokan
2014/04/01 18:37:10
I don't think you need this last condition. If act
jdduke (slow)
2014/04/01 18:38:45
OK I wasn't sure if |notifyDone()| forcefully term
|
| + shouldBeGreaterThanOrEqual(maximumWheelEventsExpected.toString(), 'actualWheelEventsOccurred'); |
|
bokan
2014/04/01 18:37:10
This seems kind of weird, why would we want a maxi
jdduke (slow)
2014/04/01 18:38:45
Why 2? Why not 1? Ideally we'd just keep going un
|
| + shouldBeGreaterThanOrEqual('cumulativeScrollX', minimumScrollXExpected.toString()); |
| + shouldBeGreaterThanOrEqual('cumulativeScrollY', minimumScrollYExpected.toString()); |
| isSuccessfullyParsed(); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| + event.preventDefault(); |
| } |
| document.addEventListener("mousewheel", recordWheelEvent); |