OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/input/input_param_traits.h" | 5 #include "content/common/input/input_param_traits.h" |
6 | 6 |
7 #include "content/common/input/input_event.h" | 7 #include "content/common/input/input_event.h" |
8 #include "content/common/input/synthetic_gesture_params.h" | 8 #include "content/common/input/synthetic_gesture_params.h" |
9 #include "content/common/input/synthetic_pinch_gesture_params.h" | 9 #include "content/common/input/synthetic_pinch_gesture_params.h" |
10 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 10 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 SyntheticSmoothScrollGestureParams::Cast(b->gesture_params())); | 78 SyntheticSmoothScrollGestureParams::Cast(b->gesture_params())); |
79 break; | 79 break; |
80 case SyntheticGestureParams::PINCH_GESTURE: | 80 case SyntheticGestureParams::PINCH_GESTURE: |
81 Compare(SyntheticPinchGestureParams::Cast(a->gesture_params()), | 81 Compare(SyntheticPinchGestureParams::Cast(a->gesture_params()), |
82 SyntheticPinchGestureParams::Cast(b->gesture_params())); | 82 SyntheticPinchGestureParams::Cast(b->gesture_params())); |
83 break; | 83 break; |
84 case SyntheticGestureParams::TAP_GESTURE: | 84 case SyntheticGestureParams::TAP_GESTURE: |
85 Compare(SyntheticTapGestureParams::Cast(a->gesture_params()), | 85 Compare(SyntheticTapGestureParams::Cast(a->gesture_params()), |
86 SyntheticTapGestureParams::Cast(b->gesture_params())); | 86 SyntheticTapGestureParams::Cast(b->gesture_params())); |
87 break; | 87 break; |
88 case SyntheticGestureParams::SMOOTH_DRAG_GESTURE: | |
89 NOTIMPLEMENTED(); | |
Sami
2015/02/18 12:01:53
Please implement this too (and add the missing bre
| |
88 } | 90 } |
89 } | 91 } |
90 | 92 |
91 static void Verify(const InputEvents& events_in) { | 93 static void Verify(const InputEvents& events_in) { |
92 IPC::Message msg; | 94 IPC::Message msg; |
93 IPC::ParamTraits<InputEvents>::Write(&msg, events_in); | 95 IPC::ParamTraits<InputEvents>::Write(&msg, events_in); |
94 | 96 |
95 InputEvents events_out; | 97 InputEvents events_out; |
96 PickleIterator iter(msg); | 98 PickleIterator iter(msg); |
97 EXPECT_TRUE(IPC::ParamTraits<InputEvents>::Read(&msg, &iter, &events_out)); | 99 EXPECT_TRUE(IPC::ParamTraits<InputEvents>::Read(&msg, &iter, &events_out)); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
228 ASSERT_EQ(SyntheticGestureParams::TAP_GESTURE, | 230 ASSERT_EQ(SyntheticGestureParams::TAP_GESTURE, |
229 gesture_params->GetGestureType()); | 231 gesture_params->GetGestureType()); |
230 SyntheticGesturePacket packet_in; | 232 SyntheticGesturePacket packet_in; |
231 packet_in.set_gesture_params(gesture_params.Pass()); | 233 packet_in.set_gesture_params(gesture_params.Pass()); |
232 | 234 |
233 Verify(packet_in); | 235 Verify(packet_in); |
234 } | 236 } |
235 | 237 |
236 } // namespace | 238 } // namespace |
237 } // namespace content | 239 } // namespace content |
OLD | NEW |