| Index: content/browser/renderer_host/input/gesture_event_queue_unittest.cc
|
| diff --git a/content/browser/renderer_host/input/gesture_event_queue_unittest.cc b/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
|
| index 0bc3879a367c762ab69411af906855cdab8d7bb2..7879b3ed723e89f428edc226db4f68e9282a71f5 100644
|
| --- a/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
|
| +++ b/content/browser/renderer_host/input/gesture_event_queue_unittest.cc
|
| @@ -73,6 +73,12 @@ class GestureEventQueueTest : public testing::Test,
|
| return GestureEventQueue::Config();
|
| }
|
|
|
| + void SetUpForGFCFilteringDisabled() {
|
| + GestureEventQueue::Config config;
|
| + config.enable_fling_cancel_filtering = false;
|
| + queue_.reset(new GestureEventQueue(this, this, config));
|
| + }
|
| +
|
| void SetUpForDebounce(int interval_ms) {
|
| queue()->set_debounce_interval_time_ms_for_testing(interval_ms);
|
| }
|
| @@ -1066,6 +1072,18 @@ INSTANTIATE_TEST_CASE_P(AllSources,
|
| blink::WebGestureDeviceTouchpad));
|
| #endif // GTEST_HAS_PARAM_TEST
|
|
|
| +TEST_F(GestureEventQueueTest, GestureFlingCancelFilteringDisabled) {
|
| + SetUpForGFCFilteringDisabled();
|
| +
|
| + // If so configured, GFC events should never be filtered, even if there are
|
| + // no active flings.
|
| + SimulateGestureEvent(WebInputEvent::GestureFlingCancel,
|
| + blink::WebGestureDeviceTouchscreen);
|
| + EXPECT_EQ(0, ActiveFlingCount());
|
| + EXPECT_EQ(1U, GetAndResetSentGestureEventCount());
|
| + EXPECT_EQ(1U, GestureEventQueueSize());
|
| +}
|
| +
|
| // Test that a GestureScrollEnd | GestureFlingStart are deferred during the
|
| // debounce interval, that Scrolls are not and that the deferred events are
|
| // sent after that timer fires.
|
|
|