Chromium Code Reviews| 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 cbfd9aa2bcca7dc5269d498b3d42bc139618d74f..6cce1054419faf84ffe8fe1d868ff9f39a585c22 100644 |
| --- a/content/common/input/input_param_traits_unittest.cc |
| +++ b/content/common/input/input_param_traits_unittest.cc |
| @@ -48,6 +48,16 @@ class InputParamTraitsTest : public testing::Test { |
| EXPECT_EQ(a->speed_in_pixels_s, b->speed_in_pixels_s); |
| } |
| + static void Compare(const SyntheticSmoothDragGestureParams* a, |
| + const SyntheticSmoothDragGestureParams* b) { |
| + EXPECT_EQ(a->gesture_source_type, b->gesture_source_type); |
| + EXPECT_EQ(a->start_point, b->start_point); |
| + 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]); |
|
Sami
2015/02/19 11:59:06
nit: indent -= 2
ssid
2015/02/20 10:58:55
Changed the previous function also.
|
| + EXPECT_EQ(a->speed_in_pixels_s, b->speed_in_pixels_s); |
| + } |
| + |
| static void Compare(const SyntheticPinchGestureParams* a, |
| const SyntheticPinchGestureParams* b) { |
| EXPECT_EQ(a->gesture_source_type, b->gesture_source_type); |
| @@ -77,6 +87,10 @@ class InputParamTraitsTest : public testing::Test { |
| Compare(SyntheticSmoothScrollGestureParams::Cast(a->gesture_params()), |
| SyntheticSmoothScrollGestureParams::Cast(b->gesture_params())); |
| break; |
| + case SyntheticGestureParams::SMOOTH_DRAG_GESTURE: |
| + Compare(SyntheticSmoothDragGestureParams::Cast(a->gesture_params()), |
| + SyntheticSmoothDragGestureParams::Cast(b->gesture_params())); |
| + break; |
| case SyntheticGestureParams::PINCH_GESTURE: |
| Compare(SyntheticPinchGestureParams::Cast(a->gesture_params()), |
| SyntheticPinchGestureParams::Cast(b->gesture_params())); |