| 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 c5c70a3b32fb4368f423807206cef8e075a4e8b0..d146182cde07d25fe760cea0079a9bdf7bfc1198 100644
|
| --- a/content/common/input/input_param_traits_unittest.cc
|
| +++ b/content/common/input/input_param_traits_unittest.cc
|
| @@ -54,6 +54,7 @@ class InputParamTraitsTest : public testing::Test {
|
| EXPECT_EQ(a->distances.size(), b->distances.size());
|
| for (size_t i = 0; i < a->distances.size(); i++)
|
| EXPECT_EQ(a->distances[i], b->distances[i]);
|
| + EXPECT_EQ(a->velocity, b->velocity);
|
| EXPECT_EQ(a->prevent_fling, b->prevent_fling);
|
| EXPECT_EQ(a->speed_in_pixels_s, b->speed_in_pixels_s);
|
| }
|
| @@ -262,6 +263,24 @@ TEST_F(InputParamTraitsTest, SyntheticSmoothScrollGestureParams) {
|
| Verify(packet_in);
|
| }
|
|
|
| +TEST_F(InputParamTraitsTest, SyntheticSmoothScrollGestureParamsWithVelocity) {
|
| + std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params(
|
| + new SyntheticSmoothScrollGestureParams);
|
| + gesture_params->gesture_source_type = SyntheticGestureParams::MOUSE_INPUT;
|
| + gesture_params->anchor.SetPoint(234, 345);
|
| + gesture_params->distances.push_back(gfx::Vector2d(123, -789));
|
| + gesture_params->distances.push_back(gfx::Vector2d(-78, 43));
|
| + gesture_params->velocity = gfx::Vector2d(-45, 76);
|
| + gesture_params->prevent_fling = false;
|
| + gesture_params->speed_in_pixels_s = 456;
|
| + ASSERT_EQ(SyntheticGestureParams::SMOOTH_SCROLL_GESTURE,
|
| + gesture_params->GetGestureType());
|
| + SyntheticGesturePacket packet_in;
|
| + packet_in.set_gesture_params(std::move(gesture_params));
|
| +
|
| + Verify(packet_in);
|
| +}
|
| +
|
| TEST_F(InputParamTraitsTest, SyntheticPinchGestureParams) {
|
| std::unique_ptr<SyntheticPinchGestureParams> gesture_params(
|
| new SyntheticPinchGestureParams);
|
|
|