Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc

Issue 1884883005: Prepare SyntheticPointerAction to handle touch actions for multiple fingers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: return nullptr Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
diff --git a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc b/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
index 748f0ae33443b8b29fcd94d096b980fdd357ef07..543cfdc9ae6a3fbcdd3fd2c417c717cee3d51692 100644
--- a/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
+++ b/content/browser/renderer_host/input/synthetic_gesture_controller_unittest.cc
@@ -1472,68 +1472,6 @@ TEST_F(SyntheticGestureControllerTest, TapGestureMouse) {
base::TimeDelta::FromMilliseconds(params.duration_ms));
}
-TEST_F(SyntheticGestureControllerTest, PointerTouchAction) {
- CreateControllerAndTarget<MockSyntheticPointerTouchActionTarget>();
-
- SyntheticPointerActionParams params = SyntheticPointerActionParams(
- SyntheticPointerActionParams::PointerActionType::PRESS);
- params.gesture_source_type = SyntheticGestureParams::TOUCH_INPUT;
- params.set_index(0);
- params.set_position(gfx::PointF(54, 89));
- SyntheticTouchPointer synthetic_pointer;
-
- std::unique_ptr<SyntheticPointerAction> gesture(
- new SyntheticPointerAction(params, &synthetic_pointer));
- QueueSyntheticGesture(std::move(gesture));
- FlushInputUntilComplete();
-
- MockSyntheticPointerTouchActionTarget* pointer_touch_target =
- static_cast<MockSyntheticPointerTouchActionTarget*>(target_);
- EXPECT_EQ(pointer_touch_target->type(), WebInputEvent::TouchStart);
- EXPECT_EQ(pointer_touch_target->positions(0), params.position());
- EXPECT_EQ(pointer_touch_target->states(0), WebTouchPoint::StatePressed);
- ASSERT_EQ(pointer_touch_target->touch_length(), 1U);
-
- params.set_index(1);
- params.set_position(gfx::PointF(79, 132));
- gesture.reset(new SyntheticPointerAction(params, &synthetic_pointer));
- QueueSyntheticGesture(std::move(gesture));
- FlushInputUntilComplete();
-
- pointer_touch_target =
- static_cast<MockSyntheticPointerTouchActionTarget*>(target_);
- EXPECT_EQ(pointer_touch_target->type(), WebInputEvent::TouchStart);
- EXPECT_EQ(pointer_touch_target->indexes(1), params.index());
- EXPECT_EQ(pointer_touch_target->positions(1), params.position());
- EXPECT_EQ(pointer_touch_target->states(1), WebTouchPoint::StatePressed);
- ASSERT_EQ(pointer_touch_target->touch_length(), 2U);
-
- params.set_pointer_action_type(
- SyntheticPointerActionParams::PointerActionType::MOVE);
- params.set_position(gfx::PointF(133, 156));
- gesture.reset(new SyntheticPointerAction(params, &synthetic_pointer));
- QueueSyntheticGesture(std::move(gesture));
- FlushInputUntilComplete();
-
- pointer_touch_target =
- static_cast<MockSyntheticPointerTouchActionTarget*>(target_);
- EXPECT_EQ(pointer_touch_target->type(), WebInputEvent::TouchMove);
- EXPECT_EQ(pointer_touch_target->positions(1), params.position());
- EXPECT_EQ(pointer_touch_target->states(1), WebTouchPoint::StateMoved);
- ASSERT_EQ(pointer_touch_target->touch_length(), 2U);
-
- params.set_pointer_action_type(
- SyntheticPointerActionParams::PointerActionType::RELEASE);
- gesture.reset(new SyntheticPointerAction(params, &synthetic_pointer));
- QueueSyntheticGesture(std::move(gesture));
- FlushInputUntilComplete();
-
- pointer_touch_target =
- static_cast<MockSyntheticPointerTouchActionTarget*>(target_);
- EXPECT_EQ(pointer_touch_target->type(), WebInputEvent::TouchEnd);
- EXPECT_EQ(pointer_touch_target->states(1), WebTouchPoint::StateReleased);
-}
-
} // namespace
-} // namespace content
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698