| Index: content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
|
| diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc b/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
|
| index 5df6e0204cdf2d3539e047b3f84706d8d63927e5..692c4191c0566f2d3a26292f30b8cf8e30d903d3 100644
|
| --- a/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
|
| +++ b/content/browser/renderer_host/input/mouse_wheel_event_queue_unittest.cc
|
| @@ -141,7 +141,8 @@ class MouseWheelEventQueueTest : public testing::TestWithParam<bool>,
|
| public:
|
| MouseWheelEventQueueTest()
|
| : acked_event_count_(0),
|
| - last_acked_event_state_(INPUT_EVENT_ACK_STATE_UNKNOWN) {
|
| + last_acked_event_state_(INPUT_EVENT_ACK_STATE_UNKNOWN),
|
| + is_in_gesture_scroll_(false) {
|
| scroll_latching_enabled_ = GetParam();
|
| queue_.reset(new MouseWheelEventQueue(this, scroll_latching_enabled_));
|
| scroll_end_timeout_ms_ = scroll_latching_enabled_ ? 100 : 0;
|
| @@ -165,6 +166,18 @@ class MouseWheelEventQueueTest : public testing::TestWithParam<bool>,
|
| std::unique_ptr<WebInputEvent> cloned_event_holder(cloned_event);
|
| *cloned_event = event;
|
| sent_events_.push_back(std::move(cloned_event_holder));
|
| +
|
| + if (event.GetType() == blink::WebInputEvent::kGestureScrollBegin &&
|
| + !event.data.scroll_begin.synthetic) {
|
| + is_in_gesture_scroll_ = true;
|
| + } else if (event.GetType() == blink::WebInputEvent::kGestureScrollEnd &&
|
| + !event.data.scroll_end.synthetic) {
|
| + is_in_gesture_scroll_ = false;
|
| + }
|
| + }
|
| +
|
| + bool IsInGestureScrollForTouchpad() const override {
|
| + return is_in_gesture_scroll_;
|
| }
|
|
|
| void OnMouseWheelEventAck(const MouseWheelEventWithLatencyInfo& event,
|
| @@ -452,6 +465,7 @@ class MouseWheelEventQueueTest : public testing::TestWithParam<bool>,
|
| WebMouseWheelEvent last_acked_event_;
|
| int64_t scroll_end_timeout_ms_;
|
| bool scroll_latching_enabled_;
|
| + bool is_in_gesture_scroll_;
|
| };
|
|
|
| // Tests that mouse wheel events are queued properly.
|
|
|