| 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/browser/renderer_host/input/touch_event_queue.h" | 5 #include "content/browser/renderer_host/input/touch_event_queue.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
| 16 #include "content/browser/renderer_host/input/timeout_monitor.h" | 16 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 17 #include "content/common/input/synthetic_web_input_event_builders.h" | 17 #include "content/common/input/synthetic_web_input_event_builders.h" |
| 18 #include "content/common/input/web_touch_event_traits.h" | 18 #include "content/public/common/input/web_touch_event_traits.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/web/WebInputEvent.h" |
| 21 | 21 |
| 22 using blink::WebGestureEvent; | 22 using blink::WebGestureEvent; |
| 23 using blink::WebInputEvent; | 23 using blink::WebInputEvent; |
| 24 using blink::WebTouchEvent; | 24 using blink::WebTouchEvent; |
| 25 using blink::WebTouchPoint; | 25 using blink::WebTouchPoint; |
| 26 | 26 |
| 27 namespace content { | 27 namespace content { |
| 28 namespace { | 28 namespace { |
| (...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2609 // TouchMove should be allowed and test for touches state. | 2609 // TouchMove should be allowed and test for touches state. |
| 2610 const WebTouchEvent& event2 = sent_event(); | 2610 const WebTouchEvent& event2 = sent_event(); |
| 2611 EXPECT_EQ(WebInputEvent::TouchMove, event2.type); | 2611 EXPECT_EQ(WebInputEvent::TouchMove, event2.type); |
| 2612 EXPECT_EQ(WebTouchPoint::StateStationary, event2.touches[0].state); | 2612 EXPECT_EQ(WebTouchPoint::StateStationary, event2.touches[0].state); |
| 2613 EXPECT_EQ(WebTouchPoint::StateMoved, event2.touches[1].state); | 2613 EXPECT_EQ(WebTouchPoint::StateMoved, event2.touches[1].state); |
| 2614 EXPECT_EQ(1U, GetAndResetSentEventCount()); | 2614 EXPECT_EQ(1U, GetAndResetSentEventCount()); |
| 2615 EXPECT_EQ(1U, GetAndResetAckedEventCount()); | 2615 EXPECT_EQ(1U, GetAndResetAckedEventCount()); |
| 2616 } | 2616 } |
| 2617 | 2617 |
| 2618 } // namespace content | 2618 } // namespace content |
| OLD | NEW |