#include "ui/touch_selection/touch_selection_controller.h"
#include <vector>
#include "base/memory/raw_ptr.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/test/motion_event_test_utils.h"
#include "ui/touch_selection/touch_selection_controller_test_api.h"
ElementsAre;
IsEmpty;
MockMotionEvent;
namespace ui {
namespace {
constexpr int kDefaultTapTimeoutMs = …;
constexpr float kDefaultTapSlop = …;
constexpr gfx::PointF kIgnoredPoint(0, 0);
constexpr TouchSelectionController::Config kDefaultConfig = …;
class MockTouchHandleDrawable : public TouchHandleDrawable { … };
class TouchSelectionControllerTest : public testing::Test,
public TouchSelectionControllerClient { … };
TEST_F(TouchSelectionControllerTest, InsertionBasic) { … }
TEST_F(TouchSelectionControllerTest, InsertionToSelectionTransition) { … }
TEST_F(TouchSelectionControllerTest, InsertionDragged) { … }
TEST_F(TouchSelectionControllerTest, InsertionDeactivatedWhileDragging) { … }
TEST_F(TouchSelectionControllerTest, InsertionTapped) { … }
TEST_F(TouchSelectionControllerTest, SelectionBasic) { … }
TEST_F(TouchSelectionControllerTest, SelectionAllowedByDoubleTap) { … }
TEST_F(TouchSelectionControllerTest, SelectionAllowedByDoubleTapOnEditable) { … }
TEST_F(TouchSelectionControllerTest,
SelectionAllowedByTripleTapOnEditableArabicVowel) { … }
TEST_F(TouchSelectionControllerTest, SelectionAllowsEmptyUpdateAfterLongPress) { … }
TEST_F(TouchSelectionControllerTest, SelectionRepeatedLongPress) { … }
TEST_F(TouchSelectionControllerTest, SelectionDragged) { … }
TEST_F(TouchSelectionControllerTest, SelectionDraggedWithOverlap) { … }
TEST_F(TouchSelectionControllerTest, SelectionDraggedToSwitchBaseAndExtent) { … }
TEST_F(TouchSelectionControllerTest, SelectionDragExtremeLineSize) { … }
TEST_F(TouchSelectionControllerTest, Animation) { … }
TEST_F(TouchSelectionControllerTest, TemporarilyHidden) { … }
TEST_F(TouchSelectionControllerTest, SelectionClearOnTap) { … }
TEST_F(TouchSelectionControllerTest, LongPressDrag) { … }
TEST_F(TouchSelectionControllerTest, DoublePressDrag) { … }
TEST_F(TouchSelectionControllerTest, LongPressNoDrag) { … }
TEST_F(TouchSelectionControllerTest, NoLongPressDragIfDisabled) { … }
TEST_F(TouchSelectionControllerTest, InsertionFocusBound) { … }
TEST_F(TouchSelectionControllerTest, SelectionFocusBound) { … }
TEST_F(TouchSelectionControllerTest, RectBetweenBounds) { … }
TEST_F(TouchSelectionControllerTest, TouchHandleHeight) { … }
TEST_F(TouchSelectionControllerTest, SelectionNoOrientationChangeWhenSwapped) { … }
TEST_F(TouchSelectionControllerTest, VerticalTextSelectionHandleSwap) { … }
TEST_F(TouchSelectionControllerTest, InsertionUpdateDragPosition) { … }
TEST_F(TouchSelectionControllerTest, SelectionUpdateDragPosition) { … }
TEST_F(TouchSelectionControllerTest, LongpressDragSelectorUpdateDragPosition) { … }
TEST_F(TouchSelectionControllerTest, NoHideActiveInsertionHandle) { … }
TEST_F(TouchSelectionControllerTest, HideActiveInsertionHandle) { … }
TEST_F(TouchSelectionControllerTest, NoHideActiveSelectionHandle) { … }
TEST_F(TouchSelectionControllerTest, HideActiveSelectionHandle) { … }
TEST_F(TouchSelectionControllerTest, SwipeToMoveCursor_HideHandlesIfShown) { … }
TEST_F(TouchSelectionControllerTest, SwipeToMoveCursor_HandleWasNotShown) { … }
}
}