Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 1981843003: Touch Action could cause wheel gestures to be filtered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 ASSERT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, filter()->last_ack_state()); 950 ASSERT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, filter()->last_ack_state());
951 951
952 // Send first touch move, and then a scroll begin. 952 // Send first touch move, and then a scroll begin.
953 touch.MovePoint(0, bounds.x() + 20 + 1 * dx, bounds.y() + 100); 953 touch.MovePoint(0, bounds.x() + 20 + 1 * dx, bounds.y() + 100);
954 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, 954 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo(touch,
955 ui::LatencyInfo()); 955 ui::LatencyInfo());
956 filter()->WaitForAck(blink::WebInputEvent::TouchMove); 956 filter()->WaitForAck(blink::WebInputEvent::TouchMove);
957 ASSERT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, filter()->last_ack_state()); 957 ASSERT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, filter()->last_ack_state());
958 958
959 blink::WebGestureEvent scroll_begin = 959 blink::WebGestureEvent scroll_begin =
960 SyntheticWebGestureEventBuilder::BuildScrollBegin(1, 1); 960 SyntheticWebGestureEventBuilder::BuildScrollBegin(
961 1, 1, blink::WebGestureDeviceTouchscreen);
961 GetRenderWidgetHost()->ForwardGestureEventWithLatencyInfo( 962 GetRenderWidgetHost()->ForwardGestureEventWithLatencyInfo(
962 scroll_begin, ui::LatencyInfo()); 963 scroll_begin, ui::LatencyInfo());
963 // Scroll begin ignores ack disposition, so don't wait for the ack. 964 // Scroll begin ignores ack disposition, so don't wait for the ack.
964 WaitAFrame(); 965 WaitAFrame();
965 966
966 // First touchmove already sent, start at 2. 967 // First touchmove already sent, start at 2.
967 for (int i = 2; i <= 10; ++i) { 968 for (int i = 2; i <= 10; ++i) {
968 // Send a touch move, followed by a scroll update 969 // Send a touch move, followed by a scroll update
969 touch.MovePoint(0, bounds.x() + 20 + i * dx, bounds.y() + 100); 970 touch.MovePoint(0, bounds.x() + 20 + i * dx, bounds.y() + 100);
970 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo( 971 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo(
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 details = dispatcher->OnEventFromSource(&release); 1127 details = dispatcher->OnEventFromSource(&release);
1127 ASSERT_FALSE(details.dispatcher_destroyed); 1128 ASSERT_FALSE(details.dispatcher_destroyed);
1128 WaitAFrame(); 1129 WaitAFrame();
1129 1130
1130 EXPECT_LT(0, tracker.num_overscroll_updates()); 1131 EXPECT_LT(0, tracker.num_overscroll_updates());
1131 EXPECT_FALSE(tracker.overscroll_completed()); 1132 EXPECT_FALSE(tracker.overscroll_completed());
1132 } 1133 }
1133 } 1134 }
1134 1135
1135 } // namespace content 1136 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698