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/platform/WebGestureEvent.h" | 20 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
21 #include "third_party/WebKit/public/platform/WebInputEvent.h" | 21 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 22 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h" |
22 | 23 |
23 namespace content { | 24 namespace content { |
24 namespace { | 25 namespace { |
25 | 26 |
26 typedef ScopedVector<InputEvent> InputEvents; | 27 typedef ScopedVector<InputEvent> InputEvents; |
27 | 28 |
28 class InputParamTraitsTest : public testing::Test { | 29 class InputParamTraitsTest : public testing::Test { |
29 protected: | 30 protected: |
30 static void Compare(const InputEvent* a, const InputEvent* b) { | 31 static void Compare(const InputEvent* a, const InputEvent* b) { |
31 EXPECT_EQ(!!a->web_event, !!b->web_event); | 32 EXPECT_EQ(!!a->web_event, !!b->web_event); |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 SyntheticGestureParams::TOUCH_INPUT); | 321 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 |