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

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

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix nits Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « 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 16e3542c9ce19b45b769fc81e71f8c91745767aa..8106b1234215fd94723de7b7b0e6c6cd67d32dd7 100644
--- a/ui/events/blink/input_handler_proxy_unittest.cc
+++ b/ui/events/blink/input_handler_proxy_unittest.cc
@@ -131,7 +131,9 @@ class MockInputHandler : public cc::InputHandler {
bool(const gfx::Point& point,
cc::InputHandler::ScrollInputType type));
- MOCK_CONST_METHOD0(HaveWheelEventHandlers, bool());
+ MOCK_CONST_METHOD1(
+ GetEventListenerProperties,
+ cc::EventListenerProperties(cc::EventListenerClass event_class));
MOCK_METHOD1(DoTouchEventsBlockScrollAt, bool(const gfx::Point& point));
MOCK_METHOD0(RequestUpdateForSynchronousInputHandler, void());
@@ -625,8 +627,9 @@ TEST_P(InputHandlerProxyTest, GesturePinch) {
VERIFY_AND_RESET_MOCKS();
gesture_.type = WebInputEvent::GesturePinchBegin;
- EXPECT_CALL(mock_input_handler_, HaveWheelEventHandlers())
- .WillOnce(testing::Return(false));
+ EXPECT_CALL(mock_input_handler_,
+ GetEventListenerProperties(cc::EventListenerClass::kMouseWheel))
+ .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
EXPECT_CALL(mock_input_handler_, PinchGestureBegin());
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
@@ -674,8 +677,9 @@ TEST_P(InputHandlerProxyTest, GesturePinchWithWheelHandler) {
VERIFY_AND_RESET_MOCKS();
gesture_.type = WebInputEvent::GesturePinchBegin;
- EXPECT_CALL(mock_input_handler_, HaveWheelEventHandlers())
- .WillOnce(testing::Return(true));
+ EXPECT_CALL(mock_input_handler_,
+ GetEventListenerProperties(cc::EventListenerClass::kMouseWheel))
+ .WillOnce(testing::Return(cc::EventListenerProperties::kBlocking));
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
VERIFY_AND_RESET_MOCKS();
@@ -723,8 +727,9 @@ TEST_P(InputHandlerProxyTest, GesturePinchAfterScrollOnMainThread) {
VERIFY_AND_RESET_MOCKS();
gesture_.type = WebInputEvent::GesturePinchBegin;
- EXPECT_CALL(mock_input_handler_, HaveWheelEventHandlers())
- .WillOnce(testing::Return(false));
+ EXPECT_CALL(mock_input_handler_,
+ GetEventListenerProperties(cc::EventListenerClass::kMouseWheel))
+ .WillOnce(testing::Return(cc::EventListenerProperties::kNone));
EXPECT_CALL(mock_input_handler_, PinchGestureBegin());
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
« no previous file with comments | « 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