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

Unified Diff: ui/events/blink/input_handler_proxy_unittest.cc

Issue 2471523002: Make touch events uncancelable during fling when they are on the current active scroll layer (Closed)
Patch Set: fling layer Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« cc/trees/layer_tree_host_impl.cc ('K') | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/blink/input_handler_proxy_unittest.cc
diff --git a/ui/events/blink/input_handler_proxy_unittest.cc b/ui/events/blink/input_handler_proxy_unittest.cc
index 78608b2d4ea9c316c87ee4bfeab3098c1395be41..95fc0ef45f0c1dc924d1fcd4312ca6c323e656ce 100644
--- a/ui/events/blink/input_handler_proxy_unittest.cc
+++ b/ui/events/blink/input_handler_proxy_unittest.cc
@@ -162,7 +162,8 @@ class MockInputHandler : public cc::InputHandler {
MOCK_CONST_METHOD1(
GetEventListenerProperties,
cc::EventListenerProperties(cc::EventListenerClass event_class));
- MOCK_METHOD1(DoTouchEventsBlockScrollAt, bool(const gfx::Point& point));
+ MOCK_METHOD1(DoTouchHandlersBlockScrollAt,
+ cc::EventListenerProperties(const gfx::Point& point));
MOCK_METHOD0(RequestUpdateForSynchronousInputHandler, void());
MOCK_METHOD1(SetSynchronousInputHandlerRootScrollOffset,
@@ -1941,12 +1942,12 @@ TEST_P(InputHandlerProxyTest, MultiTouchPointHitTestNegative) {
mock_input_handler_,
GetEventListenerProperties(cc::EventListenerClass::kTouchEndOrCancel))
.WillOnce(testing::Return(cc::EventListenerProperties::kNone));
- EXPECT_CALL(mock_input_handler_, DoTouchEventsBlockScrollAt(testing::_))
- .WillOnce(testing::Return(false));
+ EXPECT_CALL(mock_input_handler_, DoTouchHandlersBlockScrollAt(testing::_))
+ .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
EXPECT_CALL(mock_input_handler_,
- DoTouchEventsBlockScrollAt(
+ DoTouchHandlersBlockScrollAt(
testing::Property(&gfx::Point::x, testing::Lt(0))))
- .WillOnce(testing::Return(false));
+ .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
WebTouchEvent touch;
touch.type = WebInputEvent::TouchStart;
@@ -1967,13 +1968,14 @@ TEST_P(InputHandlerProxyTest, MultiTouchPointHitTestPositive) {
VERIFY_AND_RESET_MOCKS();
EXPECT_CALL(mock_input_handler_,
- DoTouchEventsBlockScrollAt(
+ DoTouchHandlersBlockScrollAt(
testing::Property(&gfx::Point::x, testing::Eq(0))))
- .WillOnce(testing::Return(false));
+ .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
EXPECT_CALL(mock_input_handler_,
- DoTouchEventsBlockScrollAt(
+ DoTouchHandlersBlockScrollAt(
testing::Property(&gfx::Point::x, testing::Gt(0))))
- .WillOnce(testing::Return(true));
+ .WillOnce(testing::Return(
+ cc::EventListenerProperties::kBlockingAndPassiveDueToFling));
// Since the second touch point hits a touch-region, there should be no
// hit-testing for the third touch point.
@@ -1999,8 +2001,8 @@ TEST_P(InputHandlerProxyTest, MultiTouchPointHitTestPassivePositive) {
mock_input_handler_,
GetEventListenerProperties(cc::EventListenerClass::kTouchStartOrMove))
.WillRepeatedly(testing::Return(cc::EventListenerProperties::kPassive));
- EXPECT_CALL(mock_input_handler_, DoTouchEventsBlockScrollAt(testing::_))
- .WillRepeatedly(testing::Return(false));
+ EXPECT_CALL(mock_input_handler_, DoTouchHandlersBlockScrollAt(testing::_))
+ .WillRepeatedly(testing::Return(cc::EventListenerProperties::kNone));
WebTouchEvent touch;
touch.type = WebInputEvent::TouchStart;
@@ -2029,8 +2031,8 @@ TEST_P(InputHandlerProxyTest, TouchStartPassiveAndTouchEndBlocking) {
mock_input_handler_,
GetEventListenerProperties(cc::EventListenerClass::kTouchEndOrCancel))
.WillOnce(testing::Return(cc::EventListenerProperties::kBlocking));
- EXPECT_CALL(mock_input_handler_, DoTouchEventsBlockScrollAt(testing::_))
- .WillOnce(testing::Return(false));
+ EXPECT_CALL(mock_input_handler_, DoTouchHandlersBlockScrollAt(testing::_))
+ .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
WebTouchEvent touch;
touch.type = WebInputEvent::TouchStart;
« cc/trees/layer_tree_host_impl.cc ('K') | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698