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

Unified Diff: content/renderer/gpu/input_handler_proxy_unittest.cc

Issue 22527005: Fix pinch gestures with nonscrollable root layer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also update InputHandlerProxy tests Created 7 years, 4 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 | « content/renderer/gpu/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: content/renderer/gpu/input_handler_proxy_unittest.cc
diff --git a/content/renderer/gpu/input_handler_proxy_unittest.cc b/content/renderer/gpu/input_handler_proxy_unittest.cc
index ca3e2cfed085c571817981f04fb75f50b64b6703..3e8b8c842389d4767b80ac0f2dcd38eb2b0cca3c 100644
--- a/content/renderer/gpu/input_handler_proxy_unittest.cc
+++ b/content/renderer/gpu/input_handler_proxy_unittest.cc
@@ -238,6 +238,7 @@ TEST_F(InputHandlerProxyTest, GestureScrollOnMainThread) {
gesture_.type = WebInputEvent::GestureScrollEnd;
gesture_.data.scrollUpdate.deltaY = 0;
+ EXPECT_CALL(mock_input_handler_, ScrollEnd()).WillOnce(testing::Return());
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
}
@@ -246,7 +247,7 @@ TEST_F(InputHandlerProxyTest, GestureScrollIgnored) {
// Instead, we should get a DROP_EVENT result, indicating
// that we could determine that there's nothing that could scroll or otherwise
// react to this gesture sequence and thus we should drop the whole gesture
- // sequence on the floor.
+ // sequence on the floor, except for the ScrollEnd.
expected_disposition_ = InputHandlerProxy::DROP_EVENT;
VERIFY_AND_RESET_MOCKS();
@@ -255,6 +256,11 @@ TEST_F(InputHandlerProxyTest, GestureScrollIgnored) {
gesture_.type = WebInputEvent::GestureScrollBegin;
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
+
+ expected_disposition_ = InputHandlerProxy::DID_NOT_HANDLE;
+ gesture_.type = WebInputEvent::GestureScrollEnd;
+ EXPECT_CALL(mock_input_handler_, ScrollEnd()).WillOnce(testing::Return());
+ EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
}
TEST_F(InputHandlerProxyTest, GesturePinch) {
@@ -359,6 +365,8 @@ TEST_F(InputHandlerProxyTest, GesturePinchAfterScrollOnMainThread) {
gesture_.type = WebInputEvent::GestureScrollEnd;
gesture_.data.scrollUpdate.deltaY = 0;
+ EXPECT_CALL(mock_input_handler_, ScrollEnd())
+ .WillOnce(testing::Return());
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_));
}
« no previous file with comments | « content/renderer/gpu/input_handler_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698