chromium/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/events/gesture_detection/touch_disposition_gesture_filter.h"

#include <stddef.h>
#include <stdint.h>

#include <memory>

#include "base/test/scoped_feature_list.h"
#include "base/types/cxx23_to_underlying.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/test/motion_event_test_utils.h"
#include "ui/events/types/event_type.h"

MockMotionEvent;

namespace ui {
namespace {

const int kDefaultEventFlags =;

}  // namespace

class TouchDispositionGestureFilterTest
    : public testing::Test,
      public TouchDispositionGestureFilterClient {};

TEST_F(TouchDispositionGestureFilterTest, BasicNoGestures) {}

// On some platforms we can get a cancel per touch point. This should result
// in an empty sequence. https://crbug.com/1407442
TEST_F(TouchDispositionGestureFilterTest, ExtraCancel) {}

TEST_F(TouchDispositionGestureFilterTest, BasicGestures) {}

TEST_F(TouchDispositionGestureFilterTest, BasicGesturesConsumed) {}

TEST_F(TouchDispositionGestureFilterTest, ConsumedThenNotConsumed) {}

TEST_F(TouchDispositionGestureFilterTest, NotConsumedThenConsumed) {}

TEST_F(TouchDispositionGestureFilterTest, ScrollAlternatelyConsumed) {}

TEST_F(TouchDispositionGestureFilterTest, NotConsumedThenNoConsumer) {}

TEST_F(TouchDispositionGestureFilterTest, EndingEventsSent) {}

TEST_F(TouchDispositionGestureFilterTest, EndingEventsNotSent) {}

TEST_F(TouchDispositionGestureFilterTest, UpdateEventsSuppressedPerEvent) {}

TEST_F(TouchDispositionGestureFilterTest, UpdateEventsDependOnBeginEvents) {}

TEST_F(TouchDispositionGestureFilterTest, MultipleTouchSequences) {}

TEST_F(TouchDispositionGestureFilterTest, FlingCancelledOnNewTouchSequence) {}

TEST_F(TouchDispositionGestureFilterTest, ScrollEndedOnTouchReleaseIfNoFling) {}

TEST_F(TouchDispositionGestureFilterTest, ScrollEndedOnNewTouchSequence) {}

TEST_F(TouchDispositionGestureFilterTest, FlingCancelledOnScrollBegin) {}

TEST_F(TouchDispositionGestureFilterTest, FlingNotCancelledIfGFCEventReceived) {}

TEST_F(TouchDispositionGestureFilterTest, TapCancelledWhenScrollBegins) {}

TEST_F(TouchDispositionGestureFilterTest, TapCancelledWhenTouchConsumed) {}

TEST_F(TouchDispositionGestureFilterTest,
       TapNotCancelledIfTapEndingEventReceived) {}

TEST_F(TouchDispositionGestureFilterTest, TimeoutGestures) {}

TEST_F(TouchDispositionGestureFilterTest, SpuriousAcksIgnored) {}

TEST_F(TouchDispositionGestureFilterTest, PacketWithInvalidTypeIgnored) {}

TEST_F(TouchDispositionGestureFilterTest, PacketsWithInvalidOrderIgnored) {}

TEST_F(TouchDispositionGestureFilterTest, ConsumedTouchCancel) {}

TEST_F(TouchDispositionGestureFilterTest, TimeoutEventAfterRelease) {}

TEST_F(TouchDispositionGestureFilterTest, ShowPressInsertedBeforeTap) {}

TEST_F(TouchDispositionGestureFilterTest, ShowPressNotInsertedIfAlreadySent) {}

TEST_F(TouchDispositionGestureFilterTest, TapAndScrollCancelledOnTouchCancel) {}

TEST_F(TouchDispositionGestureFilterTest,
       ConsumedScrollUpdateMakesFlingScrollEnd) {}

TEST_F(TouchDispositionGestureFilterTest, TapCancelledOnTouchCancel) {}

// Test that a GestureEvent whose dispatch causes a cancel event to be fired
// won't cause a crash.
TEST_F(TouchDispositionGestureFilterTest, TestCancelMidGesture) {}

// Test that a MultiFingerSwipe event is dispatched when appropriate.
TEST_F(TouchDispositionGestureFilterTest, TestAllowedMultiFingerSwipe) {}

  // Test that a MultiFingerSwipe event is dispatched when appropriate.
TEST_F(TouchDispositionGestureFilterTest, TestDisallowedMultiFingerSwipe) {}

TEST_F(TouchDispositionGestureFilterTest, TapCancelOnSecondFingerDown) {}

TEST_F(TouchDispositionGestureFilterTest, ShowPressBoundingBox) {}

TEST_F(TouchDispositionGestureFilterTest, TapCancelledBeforeGestureEnd) {}

TEST_F(TouchDispositionGestureFilterTest, EventFlagPropagation) {}


TEST_F(TouchDispositionGestureFilterTest, PreviousScrollPrevented) {}

TEST_F(TouchDispositionGestureFilterTest, AckQueueBack) {}

TEST_F(TouchDispositionGestureFilterTest, AckQueueGestureAtBack) {}

TEST_F(TouchDispositionGestureFilterTest,
       SyncAcksOnlyTriggerAppropriateGestures) {}

TEST_F(TouchDispositionGestureFilterTest,
       GestureBeginEndWhenTouchStartConsumed) {}

TEST_F(TouchDispositionGestureFilterTest, GestureBeginEndWhenTouchEndConsumed) {}

TEST_F(TouchDispositionGestureFilterTest, GestureBeginEndWhenTouchNotConsumed) {}

}  // namespace ui