#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stdint.h>
#include <list>
#include "base/command_line.h"
#include "base/containers/heap_array.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/timer/timer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/env.h"
#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/hit_test.h"
#include "ui/base/ui_base_switches.h"
#include "ui/events/event.h"
#include "ui/events/event_switches.h"
#include "ui/events/event_utils.h"
#include "ui/events/gesture_detection/gesture_configuration.h"
#include "ui/events/gesture_detection/gesture_provider.h"
#include "ui/events/gestures/gesture_recognizer_impl.h"
#include "ui/events/gestures/gesture_types.h"
#include "ui/events/test/event_generator.h"
#include "ui/events/test/events_test_utils.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
namespace aura {
namespace test {
namespace {
std::string WindowIDAsString(ui::GestureConsumer* consumer) { … }
#define EXPECT_0_EVENTS(events) …
#define EXPECT_1_EVENT(events, e0) …
#define EXPECT_2_EVENTS(events, e0, e1) …
#define EXPECT_3_EVENTS(events, e0, e1, e2) …
#define EXPECT_4_EVENTS(events, e0, e1, e2, e3) …
class GestureEventConsumeDelegate : public TestWindowDelegate { … };
class QueueTouchEventDelegate : public GestureEventConsumeDelegate { … };
class GestureEventSynthDelegate : public TestWindowDelegate { … };
class TimedEvents { … };
class TestEventHandler : public ui::EventHandler { … };
class RemoveOnTouchCancelHandler : public TestEventHandler { … };
void DelayByLongPressTimeout() { … }
void DelayByShowPressTimeout() { … }
void SetTouchRadius(ui::TouchEvent* event, float radius_x, float radius_y) { … }
}
class GestureRecognizerTest : public AuraTestBase { … };
class GestureRecognizerWithSwitchTest : public GestureRecognizerTest { … };
TEST_F(GestureRecognizerTest, TouchCancelCanDestroyWindow) { … }
TEST_F(GestureRecognizerTest, GestureEventTap) { … }
TEST_F(GestureRecognizerTest, GestureEventTapRegion) { … }
TEST_F(GestureRecognizerTest, GestureEventScroll) { … }
TEST_F(GestureRecognizerTest, GestureEventScrollPrediction) { … }
TEST_F(GestureRecognizerTest, GestureEventScrollBoundingBox) { … }
TEST_F(GestureRecognizerTest, GestureEventHorizontalRailFling) { … }
TEST_F(GestureRecognizerTest, GestureEventVerticalRailFling) { … }
TEST_F(GestureRecognizerTest, GestureEventNonRailFling) { … }
TEST_F(GestureRecognizerTest, GestureEventLongPress) { … }
TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledByScroll) { … }
TEST_F(GestureRecognizerTest, GestureEventLongTap) { … }
TEST_F(GestureRecognizerTest, GestureEventLongPressCancelledBySecondTap) { … }
TEST_F(GestureRecognizerTest, GestureEventHorizontalRailScroll) { … }
TEST_F(GestureRecognizerTest, GestureEventVerticalRailScroll) { … }
TEST_F(GestureRecognizerTest, GestureTapFollowedByScroll) { … }
TEST_F(GestureRecognizerTest, DestroyGestureProviderAuraBeforeAck) { … }
TEST_F(GestureRecognizerTest, AsynchronousGestureRecognition) { … }
TEST_F(GestureRecognizerTest, GestureEventPinchFromScroll) { … }
TEST_F(GestureRecognizerTest, GestureEventPinchFromScrollFromPinch) { … }
TEST_F(GestureRecognizerTest, GestureEventPinchFromTap) { … }
TEST_F(GestureRecognizerTest, GestureEventIgnoresDisconnectedEvents) { … }
TEST_F(GestureRecognizerTest, GestureEventTouchLockSelectsCorrectWindow) { … }
TEST_F(GestureRecognizerTest, GestureEventTouchLockIgnoresOtherScreens) { … }
TEST_F(GestureRecognizerTest, GestureEventOutsideRootWindowTap) { … }
TEST_F(GestureRecognizerTest, NoTapWithPreventDefaultedRelease) { … }
TEST_F(GestureRecognizerTest, PinchScrollWithPreventDefaultedRelease) { … }
TEST_F(GestureRecognizerTest, GestureEndLocation) { … }
TEST_F(GestureRecognizerTest, CaptureSendsGestureEnd) { … }
TEST_F(GestureRecognizerTest, CaptureDoesNotCancelFinishedTouches) { … }
TEST_F(GestureRecognizerTest, PressDoesNotCrash) { … }
TEST_F(GestureRecognizerTest, TwoFingerTap) { … }
TEST_F(GestureRecognizerTest, TwoFingerTapExpired) { … }
TEST_F(GestureRecognizerTest, TwoFingerTapChangesToPinch) { … }
TEST_F(GestureRecognizerTest, NoTwoFingerTapWhenFirstFingerHasScrolled) { … }
TEST_F(GestureRecognizerTest, MultiFingerSwipe) { … }
TEST_F(GestureRecognizerTest, TwoFingerTapCancelled) { … }
TEST_F(GestureRecognizerTest, VeryWideTwoFingerTouchDownShouldBeAPinch) { … }
TEST_F(GestureRecognizerTest, FlushAllOnHide) { … }
TEST_F(GestureRecognizerTest, LongPressTimerStopsOnPreventDefaultedTouchMoves) { … }
class ConsumesTouchMovesDelegate : public GestureEventConsumeDelegate { … };
TEST_F(GestureRecognizerTest, GestureEventScrollTouchMoveConsumed) { … }
TEST_F(GestureRecognizerTest, GestureEventScrollTwoFingerTouchMoveConsumed) { … }
TEST_F(GestureRecognizerTest, GestureEventScrollTouchMovePartialConsumed) { … }
TEST_F(GestureRecognizerTest, GestureEventDoubleTap) { … }
TEST_F(GestureRecognizerTest, GestureEventTripleTap) { … }
TEST_F(GestureRecognizerTest, TwoTapsFarApart) { … }
TEST_F(GestureRecognizerTest, TwoTapsWithDelayBetween) { … }
TEST_F(GestureRecognizerTest, BoundingBoxRadiusChange) { … }
TEST_F(GestureRecognizerTest, NoDriftInScroll) { … }
TEST_F(GestureRecognizerTest, GestureEventConsumedTouchMoveCanFireTapCancel) { … }
TEST_F(GestureRecognizerTest, CancelAllActiveTouches) { … }
TEST_F(GestureRecognizerTest, GestureEventShowPress) { … }
TEST_F(GestureRecognizerTest, GestureEventShowPressCancelledByScroll) { … }
TEST_F(GestureRecognizerTest, GestureEventShowPressSentOnTap) { … }
TEST_F(GestureRecognizerTest, GestureEventConsumedTouchMoveScrollTest) { … }
TEST_F(GestureRecognizerTest, GestureEventConsumedTouchMoveTapTest) { … }
TEST_F(GestureRecognizerTest, GestureEventConsumedTouchMoveLongPressTest) { … }
TEST_F(GestureRecognizerTest, TestExceedingSlopSlowly) { … }
TEST_F(GestureRecognizerTest, ScrollAlternatelyConsumedTest) { … }
TEST_F(GestureRecognizerTest, PinchAlternatelyConsumedTest) { … }
TEST_F(GestureRecognizerTest, GestureEventFlagsPassedFromTouchEvent) { … }
class GestureEventDeleteWindowOnLongPress : public GestureEventConsumeDelegate { … };
TEST_F(GestureRecognizerTest, GestureEventLongPressDeletingWindow) { … }
TEST_F(GestureRecognizerWithSwitchTest, GestureEventSmallPinchDisabled) { … }
TEST_F(GestureRecognizerTest, GestureEventSmallPinchEnabled) { … }
TEST_F(GestureRecognizerTest, EagerGestureDetection) { … }
TEST_F(GestureRecognizerTest, IgnoredEventsDontBreakGestureRecognition) { … }
TEST_F(GestureRecognizerTest,
MixedSyncAndAsyncAcksDontCauseOutOfOrderDispatch) { … }
TEST_F(GestureRecognizerTest, GestureEventTwoWindowsActive) { … }
TEST_F(GestureRecognizerTest, TransferEventsToRoutesAckCorrectly) { … }
TEST_F(GestureRecognizerTest, GestureConsumerCleanupBeforeTouchAck) { … }
TEST_F(GestureRecognizerTest, ResetGestureRecognizerWithGestureProvider) { … }
}
}