| Index: ui/touch_selection/touch_selection_controller_unittest.cc
|
| diff --git a/ui/touch_selection/touch_selection_controller_unittest.cc b/ui/touch_selection/touch_selection_controller_unittest.cc
|
| index fc2259e8547a5a5ba57766f8b7478fb43c4d3864..22059588abd45c65a02b3ab6a58d1c6100edd77d 100644
|
| --- a/ui/touch_selection/touch_selection_controller_unittest.cc
|
| +++ b/ui/touch_selection/touch_selection_controller_unittest.cc
|
| @@ -909,6 +909,23 @@ TEST_F(TouchSelectionControllerTest, SelectionClearOnTap) {
|
| EXPECT_EQ(gfx::PointF(), GetLastEventStart());
|
| }
|
|
|
| +TEST_F(TouchSelectionControllerTest, NoSelectionAfterLongpressThenTap) {
|
| + gfx::RectF start_rect(5, 5, 0, 10);
|
| + gfx::RectF end_rect(50, 5, 0, 10);
|
| + bool visible = true;
|
| +
|
| + // Tap-triggered selections should not be allowed.
|
| + controller().OnLongPressEvent();
|
| + controller().OnTapEvent();
|
| + ChangeSelection(start_rect, visible, end_rect, visible);
|
| + EXPECT_THAT(GetAndResetEvents(), IsEmpty());
|
| +
|
| + // Subsequent longpress selections will be allowed.
|
| + controller().OnLongPressEvent();
|
| + ChangeSelection(start_rect, visible, end_rect, visible);
|
| + EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_SHOWN));
|
| +}
|
| +
|
| TEST_F(TouchSelectionControllerTest, AllowShowingFromCurrentSelection) {
|
| gfx::RectF start_rect(5, 5, 0, 10);
|
| gfx::RectF end_rect(50, 5, 0, 10);
|
|
|