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

Unified Diff: content/common/input/input_param_traits_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: Add tests for mouse and change type of params_list Created 4 years, 7 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/common/input/input_param_traits_unittest.cc
diff --git a/content/common/input/input_param_traits_unittest.cc b/content/common/input/input_param_traits_unittest.cc
index 07a7ac3bfd7894bc96b373768e48bd06ebdd1088..06e9da3d82e64daa4c450cd182d50a1a41bd3968 100644
--- a/content/common/input/input_param_traits_unittest.cc
+++ b/content/common/input/input_param_traits_unittest.cc
@@ -89,7 +89,9 @@ class InputParamTraitsTest : public testing::Test {
EXPECT_EQ(a->position(), b->position());
}
if (a->pointer_action_type() !=
- SyntheticPointerActionParams::PointerActionType::PROCESS) {
+ SyntheticPointerActionParams::PointerActionType::PROCESS &&
+ a->pointer_action_type() !=
+ SyntheticPointerActionParams::PointerActionType::FINISH) {
EXPECT_EQ(a->index(), b->index());
}
}
@@ -310,5 +312,17 @@ TEST_F(InputParamTraitsTest, SyntheticPointerActionParamsProcess) {
Verify(packet_in);
}
+TEST_F(InputParamTraitsTest, SyntheticPointerActionParamsFinish) {
+ std::unique_ptr<SyntheticPointerActionParams> gesture_params(
+ new SyntheticPointerActionParams(
+ SyntheticPointerActionParams::PointerActionType::FINISH));
+ gesture_params->gesture_source_type = SyntheticGestureParams::TOUCH_INPUT;
+ ASSERT_EQ(SyntheticGestureParams::POINTER_ACTION,
+ gesture_params->GetGestureType());
+ SyntheticGesturePacket packet_in;
+ packet_in.set_gesture_params(std::move(gesture_params));
+ Verify(packet_in);
+}
+
} // namespace
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698