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

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

Issue 1971273002: Touch Action could cause wheel gestures to be filtered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make test separate 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698