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 <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "content/common/input/input_event.h" | 11 #include "content/common/input/input_event.h" |
12 #include "content/common/input/synthetic_gesture_params.h" | 12 #include "content/common/input/synthetic_gesture_params.h" |
13 #include "content/common/input/synthetic_pinch_gesture_params.h" | 13 #include "content/common/input/synthetic_pinch_gesture_params.h" |
14 #include "content/common/input/synthetic_pointer_action_params.h" | 14 #include "content/common/input/synthetic_pointer_action_params.h" |
15 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" | 15 #include "content/common/input/synthetic_smooth_drag_gesture_params.h" |
16 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" | 16 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h" |
17 #include "content/common/input_messages.h" | 17 #include "content/common/input_messages.h" |
18 #include "ipc/ipc_message.h" | 18 #include "ipc/ipc_message.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "third_party/WebKit/public/web/WebInputEvent.h" | 20 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
| 21 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 namespace { | 24 namespace { |
24 | 25 |
25 typedef ScopedVector<InputEvent> InputEvents; | 26 typedef ScopedVector<InputEvent> InputEvents; |
26 | 27 |
27 class InputParamTraitsTest : public testing::Test { | 28 class InputParamTraitsTest : public testing::Test { |
28 protected: | 29 protected: |
29 static void Compare(const InputEvent* a, const InputEvent* b) { | 30 static void Compare(const InputEvent* a, const InputEvent* b) { |
30 EXPECT_EQ(!!a->web_event, !!b->web_event); | 31 EXPECT_EQ(!!a->web_event, !!b->web_event); |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 gesture_params->gesture_source_type = SyntheticGestureParams::TOUCH_INPUT; | 321 gesture_params->gesture_source_type = SyntheticGestureParams::TOUCH_INPUT; |
321 ASSERT_EQ(SyntheticGestureParams::POINTER_ACTION, | 322 ASSERT_EQ(SyntheticGestureParams::POINTER_ACTION, |
322 gesture_params->GetGestureType()); | 323 gesture_params->GetGestureType()); |
323 SyntheticGesturePacket packet_in; | 324 SyntheticGesturePacket packet_in; |
324 packet_in.set_gesture_params(std::move(gesture_params)); | 325 packet_in.set_gesture_params(std::move(gesture_params)); |
325 Verify(packet_in); | 326 Verify(packet_in); |
326 } | 327 } |
327 | 328 |
328 } // namespace | 329 } // namespace |
329 } // namespace content | 330 } // namespace content |
OLD | NEW |