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 <math.h> | 5 #include <math.h> |
6 #include <stddef.h> | 6 #include <stddef.h> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "content/browser/renderer_host/input/gesture_event_queue.h" | 17 #include "content/browser/renderer_host/input/gesture_event_queue.h" |
18 #include "content/browser/renderer_host/input/input_router_client.h" | 18 #include "content/browser/renderer_host/input/input_router_client.h" |
19 #include "content/browser/renderer_host/input/input_router_impl.h" | 19 #include "content/browser/renderer_host/input/input_router_impl.h" |
20 #include "content/browser/renderer_host/input/mock_input_ack_handler.h" | 20 #include "content/browser/renderer_host/input/mock_input_ack_handler.h" |
21 #include "content/browser/renderer_host/input/mock_input_router_client.h" | 21 #include "content/browser/renderer_host/input/mock_input_router_client.h" |
22 #include "content/common/content_constants_internal.h" | 22 #include "content/common/content_constants_internal.h" |
23 #include "content/common/edit_command.h" | 23 #include "content/common/edit_command.h" |
24 #include "content/common/input/synthetic_web_input_event_builders.h" | 24 #include "content/common/input/synthetic_web_input_event_builders.h" |
25 #include "content/common/input/touch_action.h" | 25 #include "content/common/input/touch_action.h" |
26 #include "content/common/input/web_input_event_traits.h" | |
27 #include "content/common/input_messages.h" | 26 #include "content/common/input_messages.h" |
28 #include "content/common/view_messages.h" | 27 #include "content/common/view_messages.h" |
29 #include "content/public/common/content_switches.h" | 28 #include "content/public/common/content_switches.h" |
| 29 #include "content/public/common/input/web_input_event_traits.h" |
30 #include "content/public/test/mock_render_process_host.h" | 30 #include "content/public/test/mock_render_process_host.h" |
31 #include "content/public/test/test_browser_context.h" | 31 #include "content/public/test/test_browser_context.h" |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 #include "ui/events/keycodes/keyboard_codes.h" | 33 #include "ui/events/keycodes/keyboard_codes.h" |
34 | 34 |
35 #if defined(USE_AURA) | 35 #if defined(USE_AURA) |
36 #include "content/browser/renderer_host/ui_events_helper.h" | 36 #include "content/browser/renderer_host/ui_events_helper.h" |
37 #include "ui/events/event.h" | 37 #include "ui/events/event.h" |
38 #endif | 38 #endif |
39 | 39 |
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2242 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); | 2242 EXPECT_EQ(80, sent_event->data.flingStart.velocityY); |
2243 | 2243 |
2244 const WebGestureEvent* filter_event = | 2244 const WebGestureEvent* filter_event = |
2245 GetFilterWebInputEvent<WebGestureEvent>(); | 2245 GetFilterWebInputEvent<WebGestureEvent>(); |
2246 TestLocationInFilterEvent(filter_event, orig); | 2246 TestLocationInFilterEvent(filter_event, orig); |
2247 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); | 2247 EXPECT_EQ(30, filter_event->data.flingStart.velocityX); |
2248 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); | 2248 EXPECT_EQ(40, filter_event->data.flingStart.velocityY); |
2249 } | 2249 } |
2250 | 2250 |
2251 } // namespace content | 2251 } // namespace content |
OLD | NEW |