#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 = …;
}
class TouchDispositionGestureFilterTest
: public testing::Test,
public TouchDispositionGestureFilterClient { … };
TEST_F(TouchDispositionGestureFilterTest, BasicNoGestures) { … }
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_F(TouchDispositionGestureFilterTest, TestCancelMidGesture) { … }
TEST_F(TouchDispositionGestureFilterTest, TestAllowedMultiFingerSwipe) { … }
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) { … }
}