| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/renderer_host/input/gesture_event_queue.h" | 5 #include "content/browser/renderer_host/input/gesture_event_queue.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
| 18 #include "base/threading/thread_task_runner_handle.h" | 18 #include "base/threading/thread_task_runner_handle.h" |
| 19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 20 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle
r.h" | 20 #include "content/browser/renderer_host/input/touchpad_tap_suppression_controlle
r.h" |
| 21 #include "content/common/input/input_event_ack_state.h" | 21 #include "content/common/input/input_event_ack_state.h" |
| 22 #include "content/common/input/synthetic_web_input_event_builders.h" | 22 #include "content/common/input/synthetic_web_input_event_builders.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 #include "third_party/WebKit/public/web/WebInputEvent.h" | 24 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 25 | 25 |
| 26 using base::TimeDelta; | 26 using base::TimeDelta; |
| 27 using blink::WebGestureDevice; | 27 using blink::WebGestureDevice; |
| 28 using blink::WebGestureEvent; | 28 using blink::WebGestureEvent; |
| 29 using blink::WebInputEvent; | 29 using blink::WebInputEvent; |
| 30 | 30 |
| 31 namespace content { | 31 namespace content { |
| 32 | 32 |
| 33 class GestureEventQueueTest : public testing::Test, | 33 class GestureEventQueueTest : public testing::Test, |
| 34 public GestureEventQueueClient, | 34 public GestureEventQueueClient, |
| (...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 WebGestureEvent synthetic_begin = SyntheticWebGestureEventBuilder::Build( | 1174 WebGestureEvent synthetic_begin = SyntheticWebGestureEventBuilder::Build( |
| 1175 WebInputEvent::GestureScrollBegin, blink::WebGestureDeviceTouchpad); | 1175 WebInputEvent::GestureScrollBegin, blink::WebGestureDeviceTouchpad); |
| 1176 synthetic_begin.data.scrollBegin.synthetic = true; | 1176 synthetic_begin.data.scrollBegin.synthetic = true; |
| 1177 | 1177 |
| 1178 SimulateGestureEvent(synthetic_begin); | 1178 SimulateGestureEvent(synthetic_begin); |
| 1179 EXPECT_EQ(0U, GetAndResetSentGestureEventCount()); | 1179 EXPECT_EQ(0U, GetAndResetSentGestureEventCount()); |
| 1180 EXPECT_EQ(1U, GestureEventQueueSize()); | 1180 EXPECT_EQ(1U, GestureEventQueueSize()); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 } // namespace content | 1183 } // namespace content |
| OLD | NEW |