Index: content/renderer/input/input_handler_proxy_unittest.cc |
diff --git a/content/renderer/input/input_handler_proxy_unittest.cc b/content/renderer/input/input_handler_proxy_unittest.cc |
index 7994914e0b3aa4da902a0fe40daf695c395e8e92..033f8ed47ec179bad4b1f595970f265c2041391c 100644 |
--- a/content/renderer/input/input_handler_proxy_unittest.cc |
+++ b/content/renderer/input/input_handler_proxy_unittest.cc |
@@ -82,7 +82,7 @@ class MockInputHandler : public cc::InputHandler { |
void(float magnify_delta, const gfx::Point& anchor)); |
MOCK_METHOD0(PinchGestureEnd, void()); |
- MOCK_METHOD0(SetNeedsAnimate, void()); |
+ MOCK_METHOD0(SetNeedsAnimateInput, void()); |
MOCK_METHOD2(ScrollBegin, |
ScrollStatus(const gfx::Point& viewport_point, |
@@ -251,7 +251,7 @@ class InputHandlerProxyTest : public testing::Test { |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
gesture_ = |
CreateFling(timestamp, source_device, velocity, position, position, 0); |
@@ -542,7 +542,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingStartedTouchpad) { |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, ScrollEnd()); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
gesture_.type = WebInputEvent::GestureFlingStart; |
gesture_.data.flingStart.velocityX = 10; |
@@ -622,7 +622,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingAnimatesTouchpad) { |
fling_point, |
fling_global_point, |
modifiers); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, ScrollEnd()); |
@@ -634,7 +634,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingAnimatesTouchpad) { |
// fling start will typically include the last scroll from the gesture that |
// lead to the scroll (either wheel or gesture scroll), so there should be no |
// visible hitch. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.Times(0); |
base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(10); |
@@ -643,7 +643,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingAnimatesTouchpad) { |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The second call should start scrolling in the -X direction. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, |
@@ -696,7 +696,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingAnimatesTouchpad) { |
// Since we've aborted the fling, the next animation should be a no-op and |
// should not result in another |
// frame being requested. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()).Times(0); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()).Times(0); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.Times(0); |
time += base::TimeDelta::FromMilliseconds(100); |
@@ -727,7 +727,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingTransferResetsTouchpad) { |
fling_point, |
fling_global_point, |
modifiers); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, ScrollEnd()); |
@@ -737,7 +737,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingTransferResetsTouchpad) { |
// Start the fling animation at time 10. This shouldn't actually scroll, just |
// establish a start time. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.Times(0); |
base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(10); |
@@ -746,7 +746,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingTransferResetsTouchpad) { |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The second call should start scrolling in the -X direction. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, |
@@ -800,7 +800,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingTransferResetsTouchpad) { |
// Since we've aborted the fling, the next animation should be a no-op and |
// should not result in another |
// frame being requested. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()).Times(0); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()).Times(0); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.Times(0); |
time += base::TimeDelta::FromMilliseconds(100); |
@@ -828,7 +828,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingTransferResetsTouchpad) { |
fling_point, |
fling_global_point, |
modifiers); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, ScrollEnd()); |
@@ -838,7 +838,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingTransferResetsTouchpad) { |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// Start the second fling animation at time 30. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.Times(0); |
time = base::TimeTicks() + base::TimeDelta::FromSeconds(30); |
@@ -847,7 +847,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingTransferResetsTouchpad) { |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// Tick the second fling once normally. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, |
@@ -902,7 +902,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingStartedTouchscreen) { |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
gesture_.type = WebInputEvent::GestureFlingStart; |
gesture_.data.flingStart.velocityX = 10; |
@@ -1008,7 +1008,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingAnimatesTouchscreen) { |
fling_point, |
fling_global_point, |
modifiers); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
@@ -1019,14 +1019,14 @@ TEST_F(InputHandlerProxyTest, GestureFlingAnimatesTouchscreen) { |
// fling start will typically include the last scroll from the gesture that |
// lead to the scroll (either wheel or gesture scroll), so there should be no |
// visible hitch. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(10); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The second call should start scrolling in the -X direction. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, testing::Lt(0)))) |
@@ -1069,7 +1069,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingWithValidTimestamp) { |
fling_point, |
fling_global_point, |
modifiers); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
@@ -1080,7 +1080,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingWithValidTimestamp) { |
// the likelihood of a hitch between the scroll preceding the fling and |
// the first scroll generated by the fling. |
// Scrolling should start in the -X direction. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, testing::Lt(0)))) |
@@ -1126,7 +1126,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingWithInvalidTimestamp) { |
gesture_.globalX = fling_global_point.x; |
gesture_.globalY = fling_global_point.y; |
gesture_.modifiers = modifiers; |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
@@ -1135,7 +1135,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingWithInvalidTimestamp) { |
// Event though a time stamp was provided for the fling event, it will be |
// ignored as its too far in the past relative to the first animate call's |
// timestamp. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
base::TimeTicks time = |
base::TimeTicks() + start_time_offset + base::TimeDelta::FromSeconds(1); |
input_handler_->Animate(time); |
@@ -1143,7 +1143,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingWithInvalidTimestamp) { |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// Further animation ticks should update the fling as usual. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, testing::Lt(0)))) |
@@ -1188,7 +1188,7 @@ TEST_F(InputHandlerProxyTest, |
fling_point, |
fling_global_point, |
modifiers); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
@@ -1203,14 +1203,14 @@ TEST_F(InputHandlerProxyTest, |
// fling start will typically include the last scroll from the gesture that |
// lead to the scroll (either wheel or gesture scroll), so there should be no |
// visible hitch. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(10); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The second call should start scrolling in the -X direction. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, testing::Lt(0)))) |
@@ -1243,12 +1243,12 @@ TEST_F(InputHandlerProxyTest, GestureFlingStopsAtContentEdge) { |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, ScrollEnd()); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The first animate doesn't cause any scrolling. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(10); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
@@ -1261,7 +1261,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingStopsAtContentEdge) { |
testing::Property(&gfx::Vector2dF::y, testing::Lt(0)))) |
.WillOnce(testing::Return(scroll_result_did_scroll_)); |
EXPECT_CALL(mock_input_handler_, ScrollEnd()); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
time += base::TimeDelta::FromMilliseconds(100); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
@@ -1292,13 +1292,13 @@ TEST_F(InputHandlerProxyTest, GestureFlingStopsAtContentEdge) { |
&DidOverscrollParams::current_fling_velocity, |
testing::Property(&gfx::Vector2dF::y, testing::Lt(0)))))); |
EXPECT_CALL(mock_input_handler_, ScrollEnd()); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
time += base::TimeDelta::FromMilliseconds(100); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The next call to animate will no longer scroll vertically. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, |
@@ -1339,7 +1339,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingNotCancelledBySmallTimeDelta) { |
fling_point, |
fling_global_point, |
modifiers); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
@@ -1347,7 +1347,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingNotCancelledBySmallTimeDelta) { |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// With an animation timestamp equivalent to the starting timestamp, the |
// animation will simply be rescheduled. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
@@ -1355,7 +1355,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingNotCancelledBySmallTimeDelta) { |
// A small time delta should not stop the fling, even if the client |
// reports no scrolling. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, testing::Lt(0)))) |
@@ -1368,7 +1368,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingNotCancelledBySmallTimeDelta) { |
// A time delta of zero should not stop the fling, and neither should it |
// trigger scrolling on the client. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
@@ -1412,18 +1412,18 @@ TEST_F(InputHandlerProxyTest, GestureFlingCancelledAfterBothAxesStopScrolling) { |
gesture_.data.flingStart.velocityY = fling_delta.y; |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The first animate doesn't cause any scrolling. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(10); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The second animate starts scrolling in the positive X and Y directions. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::y, testing::Lt(0)))) |
@@ -1451,13 +1451,13 @@ TEST_F(InputHandlerProxyTest, GestureFlingCancelledAfterBothAxesStopScrolling) { |
testing::Field( |
&DidOverscrollParams::current_fling_velocity, |
testing::Property(&gfx::Vector2dF::y, testing::Lt(0)))))); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
time += base::TimeDelta::FromMilliseconds(10); |
input_handler_->Animate(time); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
// The next call to animate will no longer scroll vertically. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::y, testing::Eq(0)))) |
@@ -1492,7 +1492,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingCancelledAfterBothAxesStopScrolling) { |
// The next call to animate will no longer scroll horizontally or vertically, |
// and the fling should be cancelled. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()).Times(0); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()).Times(0); |
EXPECT_CALL(mock_input_handler_, ScrollBy(testing::_, testing::_)).Times(0); |
time += base::TimeDelta::FromMilliseconds(10); |
input_handler_->Animate(time); |
@@ -1580,7 +1580,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingCancelledByKeyboardEvent) { |
gesture_.data.flingStart.velocityY = fling_delta.y; |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
EXPECT_TRUE(input_handler_->gesture_scroll_on_impl_thread_for_testing()); |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
@@ -1632,7 +1632,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingWithNegativeTimeDelta) { |
fling_point, |
fling_global_point, |
modifiers); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, FlingScrollBegin()) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_EQ(expected_disposition_, input_handler_->HandleInputEvent(gesture_)); |
@@ -1642,7 +1642,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingWithNegativeTimeDelta) { |
// If we get a negative time delta, that is, the Animation tick time happens |
// before the fling's start time then we should *not* try scrolling and |
// instead reset the fling start time. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::_)).Times(0); |
@@ -1653,7 +1653,7 @@ TEST_F(InputHandlerProxyTest, GestureFlingWithNegativeTimeDelta) { |
// The first call should have reset the start time so subsequent calls should |
// generate scroll events. |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, testing::Lt(0)))) |
@@ -1699,7 +1699,7 @@ TEST_F(InputHandlerProxyTest, FlingBoost) { |
time += dt; |
float expected_delta = |
(time - last_animate_time).InSecondsF() * -fling_delta.x; |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, |
@@ -1723,7 +1723,7 @@ TEST_F(InputHandlerProxyTest, FlingBoost) { |
// Animate calls within the deferred cancellation window should continue. |
time += dt; |
expected_delta = (time - last_animate_time).InSecondsF() * -fling_delta.x; |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, |
@@ -1749,7 +1749,7 @@ TEST_F(InputHandlerProxyTest, FlingBoost) { |
time += dt; |
// Note we get *2x* as much delta because 2 flings have combined. |
expected_delta = 2 * (time - last_animate_time).InSecondsF() * -fling_delta.x; |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, |
@@ -1775,7 +1775,7 @@ TEST_F(InputHandlerProxyTest, FlingBoost) { |
time += dt; |
// Note we get *3x* as much delta because 3 flings have combined. |
expected_delta = 3 * (time - last_animate_time).InSecondsF() * -fling_delta.x; |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, |
@@ -1901,7 +1901,7 @@ TEST_F(InputHandlerProxyTest, NoFlingBoostIfFlingInDifferentDirection) { |
// velocity. |
time += dt; |
float expected_delta = dt.InSecondsF() * -orthogonal_fling_delta.y; |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::y, |
@@ -1986,7 +1986,7 @@ TEST_F(InputHandlerProxyTest, NoFlingBoostIfFlingTooSlow) { |
// Note that the new fling delta uses the *slow*, unboosted fling velocity. |
time += dt; |
float expected_delta = dt.InSecondsF() * -small_fling_delta.x; |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, |
ScrollBy(testing::_, |
testing::Property(&gfx::Vector2dF::x, |
@@ -2116,7 +2116,7 @@ TEST_F(InputHandlerProxyTest, DidReceiveInputEvent_ForFling) { |
WebFloatPoint fling_delta = WebFloatPoint(100, 100); |
gesture_.data.flingStart.velocityX = fling_delta.x; |
gesture_.data.flingStart.velocityY = fling_delta.y; |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_input_handler_, ScrollBegin(testing::_, testing::_)) |
.WillOnce(testing::Return(cc::InputHandler::SCROLL_STARTED)); |
EXPECT_CALL(mock_input_handler_, ScrollEnd()); |
@@ -2128,7 +2128,7 @@ TEST_F(InputHandlerProxyTest, DidReceiveInputEvent_ForFling) { |
testing::Mock::VerifyAndClearExpectations(&mock_input_handler_); |
testing::Mock::VerifyAndClearExpectations(&mock_client); |
- EXPECT_CALL(mock_input_handler_, SetNeedsAnimate()); |
+ EXPECT_CALL(mock_input_handler_, SetNeedsAnimateInput()); |
EXPECT_CALL(mock_client, DidAnimateForInput()); |
base::TimeTicks time = base::TimeTicks() + base::TimeDelta::FromSeconds(10); |
input_handler_->Animate(time); |