| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/mouse_wheel_event_queue.h" | 5 #include "content/browser/renderer_host/input/mouse_wheel_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 | 11 |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
| 15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
| 16 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
| 17 #include "content/browser/renderer_host/input/timeout_monitor.h" | 17 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 18 #include "content/common/input/synthetic_web_input_event_builders.h" | 18 #include "content/common/input/synthetic_web_input_event_builders.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/WebInputEvent.h" |
| 21 | 21 |
| 22 using blink::WebGestureEvent; | 22 using blink::WebGestureEvent; |
| 23 using blink::WebInputEvent; | 23 using blink::WebInputEvent; |
| 24 using blink::WebMouseWheelEvent; | 24 using blink::WebMouseWheelEvent; |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| 29 const float kWheelScrollX = 10; | 29 const float kWheelScrollX = 10; |
| 30 const float kWheelScrollY = 12; | 30 const float kWheelScrollY = 12; |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 EXPECT_EQ(1U, sent_gesture_event(updateEventIndex)->data.scrollUpdate.deltaY); | 622 EXPECT_EQ(1U, sent_gesture_event(updateEventIndex)->data.scrollUpdate.deltaY); |
| 623 EXPECT_EQ(static_cast<size_t>(updateEventIndex + 1), | 623 EXPECT_EQ(static_cast<size_t>(updateEventIndex + 1), |
| 624 GetAndResetSentEventCount()); | 624 GetAndResetSentEventCount()); |
| 625 } | 625 } |
| 626 | 626 |
| 627 INSTANTIATE_TEST_CASE_P(MouseWheelEventQueueTests, | 627 INSTANTIATE_TEST_CASE_P(MouseWheelEventQueueTests, |
| 628 MouseWheelEventQueueTest, | 628 MouseWheelEventQueueTest, |
| 629 testing::Bool()); | 629 testing::Bool()); |
| 630 | 630 |
| 631 } // namespace content | 631 } // namespace content |
| OLD | NEW |