| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.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" |
| (...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 ASSERT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, filter()->last_ack_state()); | 951 ASSERT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, filter()->last_ack_state()); |
| 952 | 952 |
| 953 // Send first touch move, and then a scroll begin. | 953 // Send first touch move, and then a scroll begin. |
| 954 touch.MovePoint(0, bounds.x() + 20 + 1 * dx, bounds.y() + 100); | 954 touch.MovePoint(0, bounds.x() + 20 + 1 * dx, bounds.y() + 100); |
| 955 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, | 955 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, |
| 956 ui::LatencyInfo()); | 956 ui::LatencyInfo()); |
| 957 filter()->WaitForAck(blink::WebInputEvent::TouchMove); | 957 filter()->WaitForAck(blink::WebInputEvent::TouchMove); |
| 958 ASSERT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, filter()->last_ack_state()); | 958 ASSERT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, filter()->last_ack_state()); |
| 959 | 959 |
| 960 blink::WebGestureEvent scroll_begin = | 960 blink::WebGestureEvent scroll_begin = |
| 961 SyntheticWebGestureEventBuilder::BuildScrollBegin(1, 1); | 961 SyntheticWebGestureEventBuilder::BuildScrollBegin( |
| 962 1, 1, blink::WebGestureDeviceTouchscreen); |
| 962 GetRenderWidgetHost()->ForwardGestureEventWithLatencyInfo( | 963 GetRenderWidgetHost()->ForwardGestureEventWithLatencyInfo( |
| 963 scroll_begin, ui::LatencyInfo()); | 964 scroll_begin, ui::LatencyInfo()); |
| 964 // Scroll begin ignores ack disposition, so don't wait for the ack. | 965 // Scroll begin ignores ack disposition, so don't wait for the ack. |
| 965 WaitAFrame(); | 966 WaitAFrame(); |
| 966 | 967 |
| 967 // First touchmove already sent, start at 2. | 968 // First touchmove already sent, start at 2. |
| 968 for (int i = 2; i <= 10; ++i) { | 969 for (int i = 2; i <= 10; ++i) { |
| 969 // Send a touch move, followed by a scroll update | 970 // Send a touch move, followed by a scroll update |
| 970 touch.MovePoint(0, bounds.x() + 20 + i * dx, bounds.y() + 100); | 971 touch.MovePoint(0, bounds.x() + 20 + i * dx, bounds.y() + 100); |
| 971 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo( | 972 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo( |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 details = dispatcher->OnEventFromSource(&release); | 1128 details = dispatcher->OnEventFromSource(&release); |
| 1128 ASSERT_FALSE(details.dispatcher_destroyed); | 1129 ASSERT_FALSE(details.dispatcher_destroyed); |
| 1129 WaitAFrame(); | 1130 WaitAFrame(); |
| 1130 | 1131 |
| 1131 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1132 EXPECT_LT(0, tracker.num_overscroll_updates()); |
| 1132 EXPECT_FALSE(tracker.overscroll_completed()); | 1133 EXPECT_FALSE(tracker.overscroll_completed()); |
| 1133 } | 1134 } |
| 1134 } | 1135 } |
| 1135 | 1136 |
| 1136 } // namespace content | 1137 } // namespace content |
| OLD | NEW |