Chromium Code Reviews| 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..a2d63b0d66587afbc9bd320690cc7a2d280aa9bb 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(EventListenerTypeForTouchStartAt, |
| + 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_, EventListenerTypeForTouchStartAt(testing::_)) |
| + .WillOnce(testing::Return(cc::EventListenerProperties::kNone)); |
|
bokan
2016/11/17 15:39:28
I believe this expects to be called twice so I thi
lanwei
2016/11/18 00:54:07
I changed the test, it is called twice, because it
bokan
2016/11/18 18:41:36
Ah! You're right, that makes more sense :)
|
| EXPECT_CALL(mock_input_handler_, |
| - DoTouchEventsBlockScrollAt( |
| + EventListenerTypeForTouchStartAt( |
| 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( |
| + EventListenerTypeForTouchStartAt( |
| testing::Property(&gfx::Point::x, testing::Eq(0)))) |
| - .WillOnce(testing::Return(false)); |
| + .WillOnce(testing::Return(cc::EventListenerProperties::kNone)); |
| EXPECT_CALL(mock_input_handler_, |
| - DoTouchEventsBlockScrollAt( |
| + EventListenerTypeForTouchStartAt( |
| testing::Property(&gfx::Point::x, testing::Gt(0)))) |
| - .WillOnce(testing::Return(true)); |
| + .WillOnce(testing::Return( |
| + cc::EventListenerProperties::kBlockingAndMaybePassiveDueToFling)); |
| // 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_, EventListenerTypeForTouchStartAt(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_, EventListenerTypeForTouchStartAt(testing::_)) |
| + .WillOnce(testing::Return(cc::EventListenerProperties::kNone)); |
| WebTouchEvent touch; |
| touch.type = WebInputEvent::TouchStart; |