| 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 aedda404440ede1527e85dba6770df4d95c2c21a..406a414dd6be6798738d6595a7987e84e2453b4e 100644
|
| --- a/ui/events/blink/input_handler_proxy_unittest.cc
|
| +++ b/ui/events/blink/input_handler_proxy_unittest.cc
|
| @@ -131,9 +131,13 @@ class MockInputHandler : public cc::InputHandler {
|
| bool(const gfx::Point& point,
|
| cc::InputHandler::ScrollInputType type));
|
|
|
| - MOCK_METHOD1(HaveWheelEventHandlersAt, bool(const gfx::Point& point));
|
| MOCK_METHOD1(DoTouchEventsBlockScrollAt, bool(const gfx::Point& point));
|
|
|
| + MOCK_METHOD1(EffectiveWheelEventListenerPropertiesAt,
|
| + uint32_t(const gfx::Point& point));
|
| + MOCK_METHOD1(EffectiveTouchEventListenerPropertiesAt,
|
| + uint32_t(const gfx::Point& point));
|
| +
|
| MOCK_METHOD0(RequestUpdateForSynchronousInputHandler, void());
|
| MOCK_METHOD1(SetSynchronousInputHandlerRootScrollOffset,
|
| void(const gfx::ScrollOffset& root_offset));
|
| @@ -625,8 +629,9 @@ TEST_P(InputHandlerProxyTest, GesturePinch) {
|
| VERIFY_AND_RESET_MOCKS();
|
|
|
| gesture_.type = WebInputEvent::GesturePinchBegin;
|
| - EXPECT_CALL(mock_input_handler_, HaveWheelEventHandlersAt(testing::_))
|
| - .WillOnce(testing::Return(false));
|
| + EXPECT_CALL(mock_input_handler_,
|
| + EffectiveWheelEventListenerPropertiesAt(testing::_))
|
| + .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
|
| EXPECT_CALL(mock_input_handler_, PinchGestureBegin());
|
| EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
|
|
|
| @@ -674,8 +679,9 @@ TEST_P(InputHandlerProxyTest, GesturePinchWithWheelHandler) {
|
| VERIFY_AND_RESET_MOCKS();
|
|
|
| gesture_.type = WebInputEvent::GesturePinchBegin;
|
| - EXPECT_CALL(mock_input_handler_, HaveWheelEventHandlersAt(testing::_))
|
| - .WillOnce(testing::Return(true));
|
| + EXPECT_CALL(mock_input_handler_,
|
| + EffectiveWheelEventListenerPropertiesAt(testing::_))
|
| + .WillOnce(testing::Return(cc::EventListenerProperties::kBlocking));
|
| EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
|
|
|
| VERIFY_AND_RESET_MOCKS();
|
| @@ -723,8 +729,9 @@ TEST_P(InputHandlerProxyTest, GesturePinchAfterScrollOnMainThread) {
|
| VERIFY_AND_RESET_MOCKS();
|
|
|
| gesture_.type = WebInputEvent::GesturePinchBegin;
|
| - EXPECT_CALL(mock_input_handler_, HaveWheelEventHandlersAt(testing::_))
|
| - .WillOnce(testing::Return(false));
|
| + EXPECT_CALL(mock_input_handler_,
|
| + EffectiveWheelEventListenerPropertiesAt(testing::_))
|
| + .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
|
| EXPECT_CALL(mock_input_handler_, PinchGestureBegin());
|
| EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
|
|
|
| @@ -1802,13 +1809,13 @@ TEST_P(InputHandlerProxyTest, MultiTouchPointHitTestNegative) {
|
| VERIFY_AND_RESET_MOCKS();
|
|
|
| EXPECT_CALL(mock_input_handler_,
|
| - DoTouchEventsBlockScrollAt(
|
| + EffectiveTouchEventListenerPropertiesAt(
|
| testing::Property(&gfx::Point::x, testing::Gt(0))))
|
| - .WillOnce(testing::Return(false));
|
| + .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
|
| EXPECT_CALL(mock_input_handler_,
|
| - DoTouchEventsBlockScrollAt(
|
| + EffectiveTouchEventListenerPropertiesAt(
|
| testing::Property(&gfx::Point::x, testing::Lt(0))))
|
| - .WillOnce(testing::Return(false));
|
| + .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
|
|
|
| WebTouchEvent touch;
|
| touch.type = WebInputEvent::TouchStart;
|
| @@ -1825,17 +1832,17 @@ TEST_P(InputHandlerProxyTest, MultiTouchPointHitTestNegative) {
|
| TEST_P(InputHandlerProxyTest, MultiTouchPointHitTestPositive) {
|
| // One of the touch points is on a touch-region. So the event should be sent
|
| // to the main thread.
|
| - expected_disposition_ = InputHandlerProxy::DID_NOT_HANDLE;
|
| + expected_disposition_ = InputHandlerProxy::NON_BLOCKING;
|
| VERIFY_AND_RESET_MOCKS();
|
|
|
| EXPECT_CALL(mock_input_handler_,
|
| - DoTouchEventsBlockScrollAt(
|
| - testing::Property(&gfx::Point::x, testing::Eq(0))))
|
| - .WillOnce(testing::Return(false));
|
| + EffectiveTouchEventListenerPropertiesAt(
|
| + testing::Property(&gfx::Point::x, testing::Le(0))))
|
| + .WillRepeatedly(testing::Return(cc::EventListenerProperties::kNone));
|
| EXPECT_CALL(mock_input_handler_,
|
| - DoTouchEventsBlockScrollAt(
|
| + EffectiveTouchEventListenerPropertiesAt(
|
| testing::Property(&gfx::Point::x, testing::Gt(0))))
|
| - .WillOnce(testing::Return(true));
|
| + .WillOnce(testing::Return(cc::EventListenerProperties::kPassive));
|
| // Since the second touch point hits a touch-region, there should be no
|
| // hit-testing for the third touch point.
|
|
|
|
|