Index: cc/trees/layer_tree_host_impl_unittest.cc |
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc |
index 38b2d663ab38628a7e29d3893e3115bc906c9d34..07fb04846769f5ec68b91bad827db0c27c7011dd 100644 |
--- a/cc/trees/layer_tree_host_impl_unittest.cc |
+++ b/cc/trees/layer_tree_host_impl_unittest.cc |
@@ -497,16 +497,16 @@ TEST_F(LayerTreeHostImplTest, ScrollRootCallsCommitAndRedraw) { |
host_impl_->SetViewportSize(gfx::Size(50, 50)); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
EXPECT_TRUE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(), |
- InputHandler::WHEEL)); |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
EXPECT_TRUE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(0, 10), |
- InputHandler::WHEEL)); |
+ InputHandler::Wheel)); |
host_impl_->ScrollEnd(); |
EXPECT_FALSE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(), |
- InputHandler::WHEEL)); |
+ InputHandler::Wheel)); |
EXPECT_TRUE(did_request_redraw_); |
EXPECT_TRUE(did_request_commit_); |
} |
@@ -516,8 +516,8 @@ TEST_F(LayerTreeHostImplTest, ScrollActiveOnlyAfterScrollMovement) { |
host_impl_->SetViewportSize(gfx::Size(50, 50)); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
EXPECT_FALSE(host_impl_->IsActivelyScrolling()); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
EXPECT_TRUE(host_impl_->IsActivelyScrolling()); |
@@ -527,8 +527,8 @@ TEST_F(LayerTreeHostImplTest, ScrollActiveOnlyAfterScrollMovement) { |
TEST_F(LayerTreeHostImplTest, ScrollWithoutRootLayer) { |
// We should not crash when trying to scroll an empty layer tree. |
- EXPECT_EQ(InputHandler::SCROLL_IGNORED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollIgnored, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
} |
TEST_F(LayerTreeHostImplTest, ScrollWithoutRenderer) { |
@@ -544,8 +544,8 @@ TEST_F(LayerTreeHostImplTest, ScrollWithoutRenderer) { |
// We should not crash when trying to scroll after the renderer initialization |
// fails. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
} |
TEST_F(LayerTreeHostImplTest, ReplaceTreeWhileScrolling) { |
@@ -554,8 +554,8 @@ TEST_F(LayerTreeHostImplTest, ReplaceTreeWhileScrolling) { |
DrawFrame(); |
// We should not crash if the tree is replaced while we are scrolling. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
host_impl_->active_tree()->DetachLayerTree(); |
scroll_layer = SetupScrollAndContentsLayers(gfx::Size(100, 100)); |
@@ -578,26 +578,25 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnWheelEventHandlers) { |
// With registered event handlers, wheel scrolls don't necessarily |
// have to go to the main thread. |
root->SetHaveWheelEventHandlers(true); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
host_impl_->ScrollEnd(); |
// But typically the scroll-blocks-on mode will require them to. |
- root->SetScrollBlocksOn(SCROLL_BLOCKS_ON_WHEEL_EVENT | |
- SCROLL_BLOCKS_ON_START_TOUCH); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ root->SetScrollBlocksOn(ScrollBlocksOnWheelEvent | ScrollBlocksOnStartTouch); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
// But gesture scrolls can still be handled. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
// And if the handlers go away, wheel scrolls can again be processed |
// on impl (despite the scroll-blocks-on mode). |
root->SetHaveWheelEventHandlers(false); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
host_impl_->ScrollEnd(); |
} |
@@ -622,21 +621,20 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnTouchEventHandlers) { |
// Touch handler regions determine whether touch events block scroll. |
root->SetTouchEventHandlerRegion(gfx::Rect(0, 0, 100, 100)); |
EXPECT_FALSE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 10))); |
- root->SetScrollBlocksOn(SCROLL_BLOCKS_ON_START_TOUCH | |
- SCROLL_BLOCKS_ON_WHEEL_EVENT); |
+ root->SetScrollBlocksOn(ScrollBlocksOnStartTouch | ScrollBlocksOnWheelEvent); |
EXPECT_TRUE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 10))); |
// But they don't influence the actual handling of the scroll gestures. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
// It's the union of scroll-blocks-on mode bits across all layers in the |
// scroll paret chain that matters. |
EXPECT_TRUE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30))); |
- root->SetScrollBlocksOn(SCROLL_BLOCKS_ON_NONE); |
+ root->SetScrollBlocksOn(ScrollBlocksOnNone); |
EXPECT_FALSE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30))); |
- child->SetScrollBlocksOn(SCROLL_BLOCKS_ON_START_TOUCH); |
+ child->SetScrollBlocksOn(ScrollBlocksOnStartTouch); |
EXPECT_TRUE(host_impl_->DoTouchEventsBlockScrollAt(gfx::Point(10, 30))); |
} |
@@ -649,31 +647,30 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnScrollEventHandlers) { |
// With registered scroll handlers, scrolls don't generally have to go |
// to the main thread. |
root->SetHaveScrollEventHandlers(true); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
host_impl_->ScrollEnd(); |
// Even the default scroll blocks on mode doesn't require this. |
- root->SetScrollBlocksOn(SCROLL_BLOCKS_ON_WHEEL_EVENT | |
- SCROLL_BLOCKS_ON_START_TOUCH); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ root->SetScrollBlocksOn(ScrollBlocksOnWheelEvent | ScrollBlocksOnStartTouch); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
// But the page can opt in to blocking on scroll event handlers. |
- root->SetScrollBlocksOn(SCROLL_BLOCKS_ON_SCROLL_EVENT); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ root->SetScrollBlocksOn(ScrollBlocksOnScrollEvent); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
- // GESTURE and WHEEL scrolls behave identically in this regard. |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ // Gesture and Wheel scrolls behave identically in this regard. |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
// And if the handlers go away, scrolls can again be processed on impl |
// (despite the scroll-blocks-on mode). |
root->SetHaveScrollEventHandlers(false); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
} |
@@ -716,36 +713,36 @@ TEST_F(LayerTreeHostImplTest, ScrollBlocksOnLayerTopology) { |
} |
// Scroll-blocks-on on a layer affects scrolls that hit that layer. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
- child1->SetScrollBlocksOn(SCROLL_BLOCKS_ON_SCROLL_EVENT); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::GESTURE)); |
+ child1->SetScrollBlocksOn(ScrollBlocksOnScrollEvent); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::Gesture)); |
// But not those that hit only other layers. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
// It's the union of bits set across the scroll ancestor chain that matters. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::Wheel)); |
host_impl_->ScrollEnd(); |
- root->SetScrollBlocksOn(SCROLL_BLOCKS_ON_WHEEL_EVENT); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::GESTURE)); |
+ root->SetScrollBlocksOn(ScrollBlocksOnWheelEvent); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::WHEEL)); |
- child2->SetScrollBlocksOn(SCROLL_BLOCKS_ON_SCROLL_EVENT); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::WHEEL)); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::Wheel)); |
+ child2->SetScrollBlocksOn(ScrollBlocksOnScrollEvent); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::Wheel)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(10, 25), InputHandler::Gesture)); |
} |
TEST_F(LayerTreeHostImplTest, FlingOnlyWhenScrollingTouchscreen) { |
@@ -754,14 +751,16 @@ TEST_F(LayerTreeHostImplTest, FlingOnlyWhenScrollingTouchscreen) { |
DrawFrame(); |
// Ignore the fling since no layer is being scrolled |
- EXPECT_EQ(InputHandler::SCROLL_IGNORED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollIgnored, |
+ host_impl_->FlingScrollBegin()); |
// Start scrolling a layer |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
// Now the fling should go ahead since we've started scrolling a layer |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->FlingScrollBegin()); |
} |
TEST_F(LayerTreeHostImplTest, FlingOnlyWhenScrollingTouchpad) { |
@@ -770,14 +769,16 @@ TEST_F(LayerTreeHostImplTest, FlingOnlyWhenScrollingTouchpad) { |
DrawFrame(); |
// Ignore the fling since no layer is being scrolled |
- EXPECT_EQ(InputHandler::SCROLL_IGNORED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollIgnored, |
+ host_impl_->FlingScrollBegin()); |
// Start scrolling a layer |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
// Now the fling should go ahead since we've started scrolling a layer |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->FlingScrollBegin()); |
} |
TEST_F(LayerTreeHostImplTest, NoFlingWhenScrollingOnMain) { |
@@ -789,11 +790,12 @@ TEST_F(LayerTreeHostImplTest, NoFlingWhenScrollingOnMain) { |
root->SetShouldScrollOnMainThread(true); |
// Start scrolling a layer |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
// The fling should be ignored since there's no layer being scrolled impl-side |
- EXPECT_EQ(InputHandler::SCROLL_IGNORED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollIgnored, |
+ host_impl_->FlingScrollBegin()); |
} |
TEST_F(LayerTreeHostImplTest, ShouldScrollOnMainThread) { |
@@ -804,10 +806,10 @@ TEST_F(LayerTreeHostImplTest, ShouldScrollOnMainThread) { |
root->SetShouldScrollOnMainThread(true); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
} |
TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionBasic) { |
@@ -821,34 +823,38 @@ TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionBasic) { |
DrawFrame(); |
// All scroll types inside the non-fast scrollable region should fail. |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(25, 25), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(25, 25), |
+ InputHandler::Wheel)); |
EXPECT_FALSE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(25, 25), |
- InputHandler::WHEEL)); |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(25, 25), InputHandler::GESTURE)); |
+ InputHandler::Wheel)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(25, 25), |
+ InputHandler::Gesture)); |
EXPECT_FALSE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(25, 25), |
- InputHandler::GESTURE)); |
+ InputHandler::Gesture)); |
// All scroll types outside this region should succeed. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(75, 75), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(75, 75), |
+ InputHandler::Wheel)); |
EXPECT_TRUE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(75, 75), |
- InputHandler::GESTURE)); |
+ InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
EXPECT_FALSE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(25, 25), |
- InputHandler::GESTURE)); |
+ InputHandler::Gesture)); |
host_impl_->ScrollEnd(); |
EXPECT_FALSE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(75, 75), |
- InputHandler::GESTURE)); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(75, 75), InputHandler::GESTURE)); |
+ InputHandler::Gesture)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(75, 75), |
+ InputHandler::Gesture)); |
EXPECT_TRUE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(75, 75), |
- InputHandler::GESTURE)); |
+ InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
host_impl_->ScrollEnd(); |
EXPECT_FALSE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(75, 75), |
- InputHandler::GESTURE)); |
+ InputHandler::Gesture)); |
} |
TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionWithOffset) { |
@@ -864,16 +870,18 @@ TEST_F(LayerTreeHostImplTest, NonFastScrollableRegionWithOffset) { |
// This point would fall into the non-fast scrollable region except that we've |
// moved the layer down by 25 pixels. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(40, 10), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(40, 10), |
+ InputHandler::Wheel)); |
EXPECT_TRUE(host_impl_->IsCurrentlyScrollingLayerAt(gfx::Point(40, 10), |
- InputHandler::WHEEL)); |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 1)); |
host_impl_->ScrollEnd(); |
// This point is still inside the non-fast region. |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(10, 10), |
+ InputHandler::Wheel)); |
} |
TEST_F(LayerTreeHostImplTest, ScrollHandlerNotPresent) { |
@@ -883,7 +891,7 @@ TEST_F(LayerTreeHostImplTest, ScrollHandlerNotPresent) { |
DrawFrame(); |
EXPECT_FALSE(host_impl_->scroll_affects_scroll_handler()); |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
EXPECT_FALSE(host_impl_->scroll_affects_scroll_handler()); |
host_impl_->ScrollEnd(); |
EXPECT_FALSE(host_impl_->scroll_affects_scroll_handler()); |
@@ -896,7 +904,7 @@ TEST_F(LayerTreeHostImplTest, ScrollHandlerPresent) { |
DrawFrame(); |
EXPECT_FALSE(host_impl_->scroll_affects_scroll_handler()); |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
EXPECT_TRUE(host_impl_->scroll_affects_scroll_handler()); |
host_impl_->ScrollEnd(); |
EXPECT_FALSE(host_impl_->scroll_affects_scroll_handler()); |
@@ -908,8 +916,8 @@ TEST_F(LayerTreeHostImplTest, ScrollByReturnsCorrectValue) { |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
// Trying to scroll to the left/top will not succeed. |
EXPECT_FALSE( |
@@ -954,8 +962,9 @@ TEST_F(LayerTreeHostImplTest, ScrollVerticallyByPageReturnsCorrectValue) { |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), |
+ InputHandler::Wheel)); |
// Trying to scroll without a vertical scrollbar will fail. |
EXPECT_FALSE(host_impl_->ScrollVerticallyByPage( |
@@ -997,8 +1006,8 @@ TEST_F(LayerTreeHostImplTest, ScrollWithUserUnscrollableLayers) { |
DrawFrame(); |
gfx::Point scroll_position(10, 10); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(scroll_position, InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(scroll_position, InputHandler::Wheel)); |
EXPECT_VECTOR_EQ(gfx::Vector2dF(), scroll_layer->CurrentScrollOffset()); |
EXPECT_VECTOR_EQ(gfx::Vector2dF(), overflow->CurrentScrollOffset()); |
@@ -1010,8 +1019,8 @@ TEST_F(LayerTreeHostImplTest, ScrollWithUserUnscrollableLayers) { |
overflow->set_user_scrollable_horizontal(false); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(scroll_position, InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(scroll_position, InputHandler::Wheel)); |
EXPECT_VECTOR_EQ(gfx::Vector2dF(), scroll_layer->CurrentScrollOffset()); |
EXPECT_VECTOR_EQ(gfx::Vector2dF(10, 10), overflow->CurrentScrollOffset()); |
@@ -1022,8 +1031,8 @@ TEST_F(LayerTreeHostImplTest, ScrollWithUserUnscrollableLayers) { |
overflow->set_user_scrollable_vertical(false); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(scroll_position, InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(scroll_position, InputHandler::Wheel)); |
EXPECT_VECTOR_EQ(gfx::Vector2dF(10, 0), scroll_layer->CurrentScrollOffset()); |
EXPECT_VECTOR_EQ(gfx::Vector2dF(10, 20), overflow->CurrentScrollOffset()); |
@@ -1054,7 +1063,7 @@ TEST_F(LayerTreeHostImplTest, ImplPinchZoom) { |
float page_scale_delta = 2.f; |
- host_impl_->ScrollBegin(gfx::Point(50, 50), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(50, 50), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point(50, 50)); |
host_impl_->PinchGestureEnd(); |
@@ -1081,15 +1090,16 @@ TEST_F(LayerTreeHostImplTest, ImplPinchZoom) { |
scroll_layer->SetScrollDelta(gfx::Vector2d()); |
float page_scale_delta = 2.f; |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point()); |
host_impl_->PinchGestureEnd(); |
host_impl_->ScrollEnd(); |
gfx::Vector2d scroll_delta(0, 10); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -1107,8 +1117,8 @@ TEST_F(LayerTreeHostImplTest, ScrollWithSwapPromises) { |
new LatencyInfoSwapPromise(latency_info)); |
SetupScrollAndContentsLayers(gfx::Size(100, 100)); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
host_impl_->QueueSwapPromiseForMainThreadScrollUpdate(swap_promise.Pass()); |
host_impl_->ScrollEnd(); |
@@ -1136,7 +1146,7 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
scroll_layer->SetScrollDelta(gfx::Vector2d()); |
float page_scale_delta = 2.f; |
- host_impl_->ScrollBegin(gfx::Point(50, 50), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(50, 50), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point(50, 50)); |
host_impl_->PinchGestureEnd(); |
@@ -1157,7 +1167,7 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
scroll_layer->SetScrollDelta(gfx::Vector2d()); |
float page_scale_delta = 10.f; |
- host_impl_->ScrollBegin(gfx::Point(50, 50), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(50, 50), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point(50, 50)); |
host_impl_->PinchGestureEnd(); |
@@ -1177,7 +1187,7 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
scroll_layer->PushScrollOffsetFromMainThread(gfx::ScrollOffset(50, 50)); |
float page_scale_delta = 0.1f; |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point()); |
host_impl_->PinchGestureEnd(); |
@@ -1199,7 +1209,7 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
scroll_layer->PushScrollOffsetFromMainThread(gfx::ScrollOffset(20, 20)); |
float page_scale_delta = 1.f; |
- host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point(10, 10)); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point(20, 20)); |
@@ -1221,7 +1231,7 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
scroll_layer->PushScrollOffsetFromMainThread(gfx::ScrollOffset(20, 20)); |
float page_scale_delta = 1.f; |
- host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(10, 10), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point(10, 10)); |
host_impl_->ScrollBy(gfx::Point(10, 10), gfx::Vector2d(-10, -10)); |
@@ -1242,7 +1252,7 @@ TEST_F(LayerTreeHostImplTest, PinchGesture) { |
scroll_layer->PullDeltaForMainThread(); |
scroll_layer->PushScrollOffsetFromMainThread(gfx::ScrollOffset(0, 0)); |
- host_impl_->ScrollBegin(gfx::Point(0, 0), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(0, 0), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(2.f, gfx::Point(0, 0)); |
host_impl_->PinchGestureUpdate(1.f, gfx::Point(0, 0)); |
@@ -1608,7 +1618,7 @@ class LayerTreeHostImplOverridePhysicalTime : public LayerTreeHostImpl { |
TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) { |
LayerTreeSettings settings; |
- settings.scrollbar_animator = LayerTreeSettings::LINEAR_FADE; |
+ settings.scrollbar_animator = LayerTreeSettings::LinearFade; |
settings.scrollbar_fade_delay_ms = 20; |
settings.scrollbar_fade_duration_ms = 20; |
@@ -1620,14 +1630,14 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) { |
EXPECT_FALSE(did_request_redraw_); |
// If no scroll happened during a scroll gesture, it should have no effect. |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel); |
host_impl_->ScrollEnd(); |
EXPECT_EQ(base::TimeDelta(), requested_scrollbar_animation_delay_); |
EXPECT_FALSE(did_request_redraw_); |
EXPECT_TRUE(scrollbar_fade_start_.Equals(base::Closure())); |
// After a scroll, a fade animation should be scheduled about 20ms from now. |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(0, 5)); |
host_impl_->ScrollEnd(); |
did_request_redraw_ = false; |
@@ -1658,7 +1668,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) { |
requested_scrollbar_animation_delay_ = base::TimeDelta(); |
// Unnecessarily Fade animation of solid color scrollbar is not triggered. |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(5, 0)); |
host_impl_->ScrollEnd(); |
EXPECT_EQ(base::TimeDelta(), requested_scrollbar_animation_delay_); |
@@ -1666,7 +1676,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarLinearFadeScheduling) { |
TEST_F(LayerTreeHostImplTest, ScrollbarFadePinchZoomScrollbars) { |
LayerTreeSettings settings; |
- settings.scrollbar_animator = LayerTreeSettings::LINEAR_FADE; |
+ settings.scrollbar_animator = LayerTreeSettings::LinearFade; |
settings.scrollbar_fade_delay_ms = 20; |
settings.scrollbar_fade_duration_ms = 20; |
settings.use_pinch_zoom_scrollbars = true; |
@@ -1681,14 +1691,14 @@ TEST_F(LayerTreeHostImplTest, ScrollbarFadePinchZoomScrollbars) { |
EXPECT_FALSE(did_request_animate_); |
// If no scroll happened during a scroll gesture, it should have no effect. |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel); |
host_impl_->ScrollEnd(); |
EXPECT_EQ(base::TimeDelta(), requested_scrollbar_animation_delay_); |
EXPECT_FALSE(did_request_animate_); |
EXPECT_TRUE(scrollbar_fade_start_.Equals(base::Closure())); |
// After a scroll, no fade animation should be scheduled. |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(5, 0)); |
host_impl_->ScrollEnd(); |
did_request_redraw_ = false; |
@@ -1705,7 +1715,7 @@ TEST_F(LayerTreeHostImplTest, ScrollbarFadePinchZoomScrollbars) { |
host_impl_->SetPageScaleOnActiveTree(1.1f); |
// After a scroll, a fade animation should be scheduled about 20ms from now. |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(5, 0)); |
host_impl_->ScrollEnd(); |
did_request_redraw_ = false; |
@@ -1727,7 +1737,7 @@ void LayerTreeHostImplTest::SetupMouseMoveAtWithDeviceScale( |
LayerTreeSettings settings; |
settings.scrollbar_fade_delay_ms = 500; |
settings.scrollbar_fade_duration_ms = 300; |
- settings.scrollbar_animator = LayerTreeSettings::THINNING; |
+ settings.scrollbar_animator = LayerTreeSettings::Thinning; |
gfx::Size viewport_size(300, 200); |
gfx::Size device_viewport_size = gfx::ToFlooredSize( |
@@ -1834,8 +1844,8 @@ TEST_F(LayerTreeHostImplTest, CompositorFrameMetadata) { |
} |
// Scrolling should update metadata immediately. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
{ |
CompositorFrameMetadata metadata = |
@@ -1868,7 +1878,7 @@ TEST_F(LayerTreeHostImplTest, CompositorFrameMetadata) { |
} |
// Page scale should update metadata correctly (shrinking only the viewport). |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(2.f, gfx::Point()); |
host_impl_->PinchGestureEnd(); |
@@ -2434,8 +2444,8 @@ TEST_F(LayerTreeHostImplTest, ScrollRootIgnored) { |
DrawFrame(); |
// Scroll event is ignored because layer is not scrollable. |
- EXPECT_EQ(InputHandler::SCROLL_IGNORED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollIgnored, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
EXPECT_FALSE(did_request_redraw_); |
EXPECT_FALSE(did_request_commit_); |
} |
@@ -2592,8 +2602,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, ScrollTopControlsByFractionalAmount) { |
gfx::Size(10, 10), gfx::Size(10, 10), gfx::Size(10, 10)); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
// Make the test scroll delta a fractional amount, to verify that the |
// fixed container size delta is (1) non-zero, and (2) fractional, and |
@@ -2633,8 +2643,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, |
outer_scroll->SetDrawsContent(true); |
host_impl_->active_tree()->PushPageScaleFromMainThread(2.f, 1.f, 2.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(0.f, 50.f)); |
// The entire scroll delta should have been used to hide the top controls. |
@@ -2652,8 +2662,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, |
host_impl_->ScrollEnd(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), inner_scroll); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(0.f, -50.f)); |
@@ -2699,8 +2709,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, FixedContainerDelta) { |
// not be scaled. |
host_impl_->active_tree()->PushPageScaleFromMainThread(page_scale, 1.f, 2.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
// Scroll down, the top controls hiding should expand the viewport size so |
// the delta should be equal to the scroll distance. |
@@ -2771,8 +2781,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsScrollableSublayer) { |
// Scroll 25px to hide top controls |
gfx::Vector2dF scroll_delta(0.f, 25.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -2920,8 +2930,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsViewportOffsetClamping) { |
// Hide the top controls by 25px. |
gfx::Vector2dF scroll_delta(0.f, 25.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
// scrolling down at the max extents no longer hides the top controls |
@@ -2946,8 +2956,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsViewportOffsetClamping) { |
// Bring the top controls down by 25px. |
scroll_delta = gfx::Vector2dF(0.f, -25.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -2973,8 +2983,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsAspectRatio) { |
host_impl_->top_controls_manager()->ContentTopOffset()); |
gfx::Vector2dF scroll_delta(0.f, 25.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3011,8 +3021,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsScrollOuterViewport) { |
// Send a gesture scroll that will scroll the outer viewport, make sure the |
// top controls get scrolled. |
gfx::Vector2dF scroll_delta(0.f, 15.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(host_impl_->OuterViewportScrollLayer(), |
host_impl_->CurrentlyScrollingLayer()); |
@@ -3023,8 +3033,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsScrollOuterViewport) { |
host_impl_->top_controls_manager()->ContentTopOffset()); |
scroll_delta = gfx::Vector2dF(0.f, 50.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(0, host_impl_->top_controls_manager()->ContentTopOffset()); |
@@ -3039,8 +3049,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, TopControlsScrollOuterViewport) { |
host_impl_->InnerViewportScrollLayer()->SetScrollDelta(inner_viewport_offset); |
scroll_delta = gfx::Vector2dF(0.f, -65.f); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(top_controls_height_, |
@@ -3058,8 +3068,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, |
SetupTopControlsAndScrollLayer(); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->top_controls_manager()->ScrollBegin(); |
host_impl_->top_controls_manager()->ScrollBy(gfx::Vector2dF(0.f, 50.f)); |
@@ -3071,8 +3081,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, |
host_impl_->ScrollEnd(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
float scroll_increment_y = -25.f; |
host_impl_->top_controls_manager()->ScrollBegin(); |
@@ -3100,8 +3110,8 @@ TEST_F(LayerTreeHostImplTopControlsTest, |
gfx::ScrollOffset(), |
host_impl_->active_tree()->InnerViewportScrollLayer()->MaxScrollOffset()); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
} |
TEST_F(LayerTreeHostImplTest, ScrollNonCompositedRoot) { |
@@ -3136,8 +3146,9 @@ TEST_F(LayerTreeHostImplTest, ScrollNonCompositedRoot) { |
host_impl_->SetViewportSize(surface_size); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
host_impl_->ScrollEnd(); |
EXPECT_TRUE(did_request_redraw_); |
@@ -3156,8 +3167,9 @@ TEST_F(LayerTreeHostImplTest, ScrollChildCallsCommitAndRedraw) { |
host_impl_->SetViewportSize(surface_size); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
host_impl_->ScrollEnd(); |
EXPECT_TRUE(did_request_redraw_); |
@@ -3175,8 +3187,9 @@ TEST_F(LayerTreeHostImplTest, ScrollMissesChild) { |
// Scroll event is ignored because the input coordinate is outside the layer |
// boundaries. |
- EXPECT_EQ(InputHandler::SCROLL_IGNORED, |
- host_impl_->ScrollBegin(gfx::Point(15, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollIgnored, |
+ host_impl_->ScrollBegin(gfx::Point(15, 5), |
+ InputHandler::Wheel)); |
EXPECT_FALSE(did_request_redraw_); |
EXPECT_FALSE(did_request_commit_); |
} |
@@ -3200,8 +3213,9 @@ TEST_F(LayerTreeHostImplTest, ScrollMissesBackfacingChild) { |
// Scroll event is ignored because the scrollable layer is not facing the |
// viewer and there is nothing scrollable behind it. |
- EXPECT_EQ(InputHandler::SCROLL_IGNORED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollIgnored, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
EXPECT_FALSE(did_request_redraw_); |
EXPECT_FALSE(did_request_commit_); |
} |
@@ -3229,8 +3243,9 @@ TEST_F(LayerTreeHostImplTest, ScrollBlockedByContentLayer) { |
// Scrolling fails because the content layer is asking to be scrolled on the |
// main thread. |
- EXPECT_EQ(InputHandler::SCROLL_ON_MAIN_THREAD, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollOnMainThread, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
} |
TEST_F(LayerTreeHostImplTest, ScrollRootAndChangePageScaleOnMainThread) { |
@@ -3263,8 +3278,9 @@ TEST_F(LayerTreeHostImplTest, ScrollRootAndChangePageScaleOnMainThread) { |
gfx::Vector2d scroll_delta(0, 10); |
gfx::Vector2d expected_scroll_delta = scroll_delta; |
gfx::ScrollOffset expected_max_scroll = root_scroll->MaxScrollOffset(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3314,13 +3330,14 @@ TEST_F(LayerTreeHostImplTest, ScrollRootAndChangePageScaleOnImplThread) { |
gfx::Vector2d scroll_delta(0, 10); |
gfx::Vector2d expected_scroll_delta = scroll_delta; |
gfx::ScrollOffset expected_max_scroll = root_scroll->MaxScrollOffset(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
// Set new page scale on impl thread by pinching. |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale, gfx::Point()); |
host_impl_->PinchGestureEnd(); |
@@ -3362,7 +3379,7 @@ TEST_F(LayerTreeHostImplTest, PageScaleDeltaAppliedToRootScrollLayerOnly) { |
LayerImpl* grand_child = child->children()[0]; |
// Set new page scale on impl thread by pinching. |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(new_page_scale, gfx::Point()); |
host_impl_->PinchGestureEnd(); |
@@ -3425,8 +3442,9 @@ TEST_F(LayerTreeHostImplTest, ScrollChildAndChangePageScaleOnMainThread) { |
gfx::Vector2d scroll_delta(0, 10); |
gfx::Vector2d expected_scroll_delta(scroll_delta); |
gfx::ScrollOffset expected_max_scroll(child->MaxScrollOffset()); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3476,8 +3494,9 @@ TEST_F(LayerTreeHostImplTest, ScrollChildBeyondLimit) { |
DrawFrame(); |
{ |
gfx::Vector2d scroll_delta(-8, -7); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3529,9 +3548,9 @@ TEST_F(LayerTreeHostImplTest, ScrollWithoutBubbling) { |
DrawFrame(); |
{ |
gfx::Vector2d scroll_delta(0, -10); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollBegin(gfx::Point(), |
- InputHandler::NON_BUBBLING_GESTURE)); |
+ InputHandler::NonBubblingGesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3549,9 +3568,9 @@ TEST_F(LayerTreeHostImplTest, ScrollWithoutBubbling) { |
// The next time we scroll we should only scroll the parent. |
scroll_delta = gfx::Vector2d(0, -3); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollBegin(gfx::Point(5, 5), |
- InputHandler::NON_BUBBLING_GESTURE)); |
+ InputHandler::NonBubblingGesture)); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), grand_child); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), child); |
@@ -3568,9 +3587,9 @@ TEST_F(LayerTreeHostImplTest, ScrollWithoutBubbling) { |
// After scrolling the parent, another scroll on the opposite direction |
// should still scroll the child. |
scroll_delta = gfx::Vector2d(0, 7); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollBegin(gfx::Point(5, 5), |
- InputHandler::NON_BUBBLING_GESTURE)); |
+ InputHandler::NonBubblingGesture)); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), grand_child); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), grand_child); |
@@ -3590,9 +3609,9 @@ TEST_F(LayerTreeHostImplTest, ScrollWithoutBubbling) { |
host_impl_->SetPageScaleOnActiveTree(2.f); |
scroll_delta = gfx::Vector2d(0, -2); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollBegin(gfx::Point(1, 1), |
- InputHandler::NON_BUBBLING_GESTURE)); |
+ InputHandler::NonBubblingGesture)); |
EXPECT_EQ(grand_child, host_impl_->CurrentlyScrollingLayer()); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3632,8 +3651,9 @@ TEST_F(LayerTreeHostImplTest, ScrollEventBubbling) { |
DrawFrame(); |
{ |
gfx::Vector2d scroll_delta(0, 4); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3678,8 +3698,9 @@ TEST_F(LayerTreeHostImplTest, ScrollBeforeRedraw) { |
host_impl_->active_tree()->DidBecomeActive(); |
// Scrolling should still work even though we did not draw yet. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
} |
TEST_F(LayerTreeHostImplTest, ScrollAxisAlignedRotatedLayer) { |
@@ -3696,8 +3717,9 @@ TEST_F(LayerTreeHostImplTest, ScrollAxisAlignedRotatedLayer) { |
// Scroll to the right in screen coordinates with a gesture. |
gfx::Vector2d gesture_scroll_delta(10, 0); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), |
+ InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), gesture_scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3709,8 +3731,9 @@ TEST_F(LayerTreeHostImplTest, ScrollAxisAlignedRotatedLayer) { |
// Reset and scroll down with the wheel. |
scroll_layer->SetScrollDelta(gfx::Vector2dF()); |
gfx::Vector2d wheel_scroll_delta(0, 10); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), wheel_scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3756,8 +3779,9 @@ TEST_F(LayerTreeHostImplTest, ScrollNonAxisAlignedRotatedLayer) { |
{ |
// Scroll down in screen coordinates with a gesture. |
gfx::Vector2d gesture_scroll_delta(0, 10); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(1, 1), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(1, 1), |
+ InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), gesture_scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3778,8 +3802,9 @@ TEST_F(LayerTreeHostImplTest, ScrollNonAxisAlignedRotatedLayer) { |
// Now reset and scroll the same amount horizontally. |
child_ptr->SetScrollDelta(gfx::Vector2dF()); |
gfx::Vector2d gesture_scroll_delta(10, 0); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(1, 1), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(1, 1), |
+ InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), gesture_scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3820,8 +3845,8 @@ TEST_F(LayerTreeHostImplTest, ScrollScaledLayer) { |
// Scroll down in screen coordinates with a gesture. |
gfx::Vector2d scroll_delta(0, 10); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3835,8 +3860,8 @@ TEST_F(LayerTreeHostImplTest, ScrollScaledLayer) { |
// Reset and scroll down with the wheel. |
scroll_layer->SetScrollDelta(gfx::Vector2dF()); |
gfx::Vector2d wheel_scroll_delta(0, 10); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), wheel_scroll_delta); |
host_impl_->ScrollEnd(); |
@@ -3975,7 +4000,7 @@ TEST_F(LayerTreeHostImplTest, RootLayerScrollOffsetDelegation) { |
// The pinch gesture doesn't put the delegate into a state where the scroll |
// offset is outside of the scroll range. (this is verified by DCHECKs in the |
// delegate). |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(2.f, gfx::Point()); |
host_impl_->PinchGestureUpdate(.5f, gfx::Point()); |
@@ -3987,8 +4012,8 @@ TEST_F(LayerTreeHostImplTest, RootLayerScrollOffsetDelegation) { |
gfx::ScrollOffset current_offset(7.f, 8.f); |
scroll_delegate.set_getter_return_value(current_offset); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(ScrollOffsetWithDelta(current_offset, scroll_delta), |
@@ -4069,8 +4094,8 @@ TEST_F(LayerTreeHostImplTest, OverscrollRoot) { |
EXPECT_EQ(gfx::Vector2dF(), host_impl_->accumulated_root_overscroll()); |
// In-bounds scrolling does not affect overscroll. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
scroll_result = host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
EXPECT_TRUE(scroll_result.did_scroll); |
EXPECT_FALSE(scroll_result.did_overscroll_root); |
@@ -4204,9 +4229,9 @@ TEST_F(LayerTreeHostImplTest, OverscrollChildWithoutBubbling) { |
DrawFrame(); |
{ |
gfx::Vector2d scroll_delta(0, -10); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollBegin(gfx::Point(), |
- InputHandler::NON_BUBBLING_GESTURE)); |
+ InputHandler::NonBubblingGesture)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(gfx::Vector2dF(), host_impl_->accumulated_root_overscroll()); |
host_impl_->ScrollEnd(); |
@@ -4214,9 +4239,9 @@ TEST_F(LayerTreeHostImplTest, OverscrollChildWithoutBubbling) { |
// The next time we scroll we should only scroll the parent, but overscroll |
// should still not reach the root layer. |
scroll_delta = gfx::Vector2d(0, -30); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollBegin(gfx::Point(5, 5), |
- InputHandler::NON_BUBBLING_GESTURE)); |
+ InputHandler::NonBubblingGesture)); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), grand_child_layer); |
EXPECT_EQ(gfx::Vector2dF(), host_impl_->accumulated_root_overscroll()); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
@@ -4227,9 +4252,9 @@ TEST_F(LayerTreeHostImplTest, OverscrollChildWithoutBubbling) { |
// After scrolling the parent, another scroll on the opposite direction |
// should scroll the child. |
scroll_delta = gfx::Vector2d(0, 70); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollBegin(gfx::Point(5, 5), |
- InputHandler::NON_BUBBLING_GESTURE)); |
+ InputHandler::NonBubblingGesture)); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), grand_child_layer); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), grand_child_layer); |
@@ -4266,8 +4291,9 @@ TEST_F(LayerTreeHostImplTest, OverscrollChildEventBubbling) { |
DrawFrame(); |
{ |
gfx::Vector2d scroll_delta(0, 8); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(5, 5), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(5, 5), |
+ InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
EXPECT_EQ(gfx::Vector2dF(), host_impl_->accumulated_root_overscroll()); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
@@ -4291,8 +4317,8 @@ TEST_F(LayerTreeHostImplTest, OverscrollAlways) { |
EXPECT_EQ(gfx::Vector2dF(), host_impl_->accumulated_root_overscroll()); |
// Even though the layer can't scroll the overscroll still happens. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
EXPECT_EQ(gfx::Vector2dF(0, 10), host_impl_->accumulated_root_overscroll()); |
} |
@@ -4329,8 +4355,8 @@ TEST_F(LayerTreeHostImplTest, NoOverscrollOnFractionalDeviceScale) { |
// Horizontal & Vertical GlowEffect should not be applied when |
// content size is less then view port size. For Example Horizontal & |
// vertical GlowEffect should not be applied in about:blank page. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(0, 0), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(0, 0), InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(0, -1)); |
EXPECT_EQ(gfx::Vector2dF().ToString(), |
host_impl_->accumulated_root_overscroll().ToString()); |
@@ -4366,8 +4392,8 @@ TEST_F(LayerTreeHostImplTest, NoOverscrollWhenNotAtEdge) { |
// Edge glow effect should be applicable only upon reaching Edges |
// of the content. unnecessary glow effect calls shouldn't be |
// called while scrolling up without reaching the edge of the content. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(0, 0), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(0, 0), InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(0, 100)); |
EXPECT_EQ(gfx::Vector2dF().ToString(), |
host_impl_->accumulated_root_overscroll().ToString()); |
@@ -4377,10 +4403,10 @@ TEST_F(LayerTreeHostImplTest, NoOverscrollWhenNotAtEdge) { |
host_impl_->ScrollEnd(); |
// unusedrootDelta should be subtracted from applied delta so that |
// unwanted glow effect calls are not called. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollBegin(gfx::Point(0, 0), |
- InputHandler::NON_BUBBLING_GESTURE)); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ InputHandler::NonBubblingGesture)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, host_impl_->FlingScrollBegin()); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(0, 20)); |
EXPECT_EQ(gfx::Vector2dF(0.000000f, 17.699997f).ToString(), |
host_impl_->accumulated_root_overscroll().ToString()); |
@@ -4391,8 +4417,8 @@ TEST_F(LayerTreeHostImplTest, NoOverscrollWhenNotAtEdge) { |
host_impl_->ScrollEnd(); |
// TestCase to check kEpsilon, which prevents minute values to trigger |
// gloweffect without reaching edge. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(0, 0), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(0, 0), InputHandler::Wheel)); |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2dF(-0.12f, 0.1f)); |
EXPECT_EQ(gfx::Vector2dF().ToString(), |
host_impl_->accumulated_root_overscroll().ToString()); |
@@ -4467,7 +4493,7 @@ class BlendStateCheckLayer : public LayerImpl { |
resource_id_(resource_provider->CreateResource( |
gfx::Size(1, 1), |
GL_CLAMP_TO_EDGE, |
- ResourceProvider::TEXTURE_HINT_IMMUTABLE, |
+ ResourceProvider::TextureHintImmutable, |
RGBA_8888)) { |
resource_provider->AllocateForTesting(resource_id_); |
SetBounds(gfx::Size(10, 10)); |
@@ -6410,8 +6436,7 @@ TEST_F(LayerTreeHostImplTest, FarAwayQuadsDontNeedAA) { |
host_impl_->ActivateSyncTree(); |
- bool update_lcd_text = false; |
- host_impl_->active_tree()->UpdateDrawProperties(update_lcd_text); |
+ host_impl_->active_tree()->UpdateDrawProperties(); |
ASSERT_EQ(1u, host_impl_->active_tree()->RenderSurfaceLayerList().size()); |
LayerTreeHostImpl::FrameData frame; |
@@ -6892,10 +6917,12 @@ TEST_F(LayerTreeHostImplTest, TouchFlingShouldNotBubble) { |
host_impl_->active_tree()->DidBecomeActive(); |
DrawFrame(); |
{ |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), |
+ InputHandler::Gesture)); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->FlingScrollBegin()); |
gfx::Vector2d scroll_delta(0, 100); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
@@ -6943,8 +6970,8 @@ TEST_F(LayerTreeHostImplTest, TouchFlingShouldLockToFirstScrolledLayer) { |
LayerImpl* grand_child = child->children()[0]; |
gfx::Vector2d scroll_delta(0, -2); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_TRUE(host_impl_->ScrollBy(gfx::Point(), scroll_delta).did_scroll); |
// The grand child should have scrolled up to its limit. |
@@ -6964,7 +6991,7 @@ TEST_F(LayerTreeHostImplTest, TouchFlingShouldLockToFirstScrolledLayer) { |
// The first |ScrollBy| after the fling should re-lock the scrolling |
// layer to the first layer that scrolled, which is the child. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, host_impl_->FlingScrollBegin()); |
EXPECT_TRUE(host_impl_->ScrollBy(gfx::Point(), scroll_delta).did_scroll); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), child); |
@@ -7003,10 +7030,11 @@ TEST_F(LayerTreeHostImplTest, WheelFlingShouldBubble) { |
host_impl_->active_tree()->DidBecomeActive(); |
DrawFrame(); |
{ |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->FlingScrollBegin()); |
gfx::Vector2d scroll_delta(0, 100); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
@@ -7025,7 +7053,7 @@ TEST_F(LayerTreeHostImplTest, WheelFlingShouldBubble) { |
TEST_F(LayerTreeHostImplTest, ScrollUnknownNotOnAncestorChain) { |
// If we ray cast a scroller that is not on the first layer's ancestor chain, |
- // we should return SCROLL_UNKNOWN. |
+ // we should return ScrollUnknown. |
gfx::Size content_size(100, 100); |
SetupScrollAndContentsLayers(content_size); |
@@ -7051,14 +7079,14 @@ TEST_F(LayerTreeHostImplTest, ScrollUnknownNotOnAncestorChain) { |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_UNKNOWN, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollUnknown, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
} |
TEST_F(LayerTreeHostImplTest, ScrollUnknownScrollAncestorMismatch) { |
// If we ray cast a scroller this is on the first layer's ancestor chain, but |
// is not the first scroller we encounter when walking up from the layer, we |
- // should also return SCROLL_UNKNOWN. |
+ // should also return ScrollUnknown. |
gfx::Size content_size(100, 100); |
SetupScrollAndContentsLayers(content_size); |
@@ -7090,8 +7118,8 @@ TEST_F(LayerTreeHostImplTest, ScrollUnknownScrollAncestorMismatch) { |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_UNKNOWN, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollUnknown, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
} |
TEST_F(LayerTreeHostImplTest, ScrollInvisibleScroller) { |
@@ -7117,10 +7145,10 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScroller) { |
// it. The reason for this is that if the scrolling the scroll would not move |
// any layer that is a drawn RSLL member, then we can ignore the hit. |
// |
- // Why SCROLL_STARTED? In this case, it's because we've bubbled out and |
- // started overscrolling the inner viewport. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ // Why ScrollStarted? In this case, it's because we've bubbled out and started |
+ // overscrolling the inner viewport. |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
EXPECT_EQ(2, host_impl_->CurrentlyScrollingLayer()->id()); |
} |
@@ -7174,10 +7202,10 @@ TEST_F(LayerTreeHostImplTest, ScrollInvisibleScrollerWithVisibleScrollChild) { |
// it. The reason for this is that if the scrolling the scroll would not move |
// any layer that is a drawn RSLL member, then we can ignore the hit. |
// |
- // Why SCROLL_STARTED? In this case, it's because we've bubbled out and |
- // started overscrolling the inner viewport. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ // Why ScrollStarted? In this case, it's because we've bubbled out and started |
+ // overscrolling the inner viewport. |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
EXPECT_EQ(7, host_impl_->CurrentlyScrollingLayer()->id()); |
} |
@@ -7373,8 +7401,8 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) { |
LayerImpl* scroll_layer = SetupScrollAndContentsLayers(gfx::Size(100, 100)); |
// Scrolling normally should not trigger any forwarding. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_TRUE( |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)).did_scroll); |
host_impl_->ScrollEnd(); |
@@ -7386,8 +7414,8 @@ TEST_F(LayerTreeHostImplTest, SimpleSwapPromiseMonitor) { |
// Scrolling with a scroll handler should defer the swap to the main |
// thread. |
scroll_layer->SetHaveScrollEventHandlers(true); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_TRUE( |
host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)).did_scroll); |
host_impl_->ScrollEnd(); |
@@ -7462,8 +7490,8 @@ TEST_F(LayerTreeHostImplWithTopControlsTest, ScrollHandledByTopControls) { |
BOTH, SHOWN, false); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_EQ(0, host_impl_->top_controls_manager()->ControlsTopOffset()); |
EXPECT_EQ(gfx::Vector2dF().ToString(), |
scroll_layer->CurrentScrollOffset().ToString()); |
@@ -7521,8 +7549,8 @@ TEST_F(LayerTreeHostImplWithTopControlsTest, TopControlsAnimationAtOrigin) { |
BOTH, SHOWN, false); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_EQ(0, host_impl_->top_controls_manager()->ControlsTopOffset()); |
EXPECT_EQ(gfx::Vector2dF().ToString(), |
scroll_layer->CurrentScrollOffset().ToString()); |
@@ -7591,8 +7619,8 @@ TEST_F(LayerTreeHostImplWithTopControlsTest, TopControlsAnimationAfterScroll) { |
gfx::ScrollOffset(0, initial_scroll_offset)); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_EQ(0, host_impl_->top_controls_manager()->ControlsTopOffset()); |
EXPECT_EQ(gfx::Vector2dF(0, initial_scroll_offset).ToString(), |
scroll_layer->CurrentScrollOffset().ToString()); |
@@ -7652,8 +7680,8 @@ TEST_F(LayerTreeHostImplWithTopControlsTest, |
false); |
DrawFrame(); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_EQ(0, host_impl_->top_controls_manager()->ControlsTopOffset()); |
float offset = 50; |
@@ -7785,9 +7813,9 @@ TEST_F(LayerTreeHostImplVirtualViewportTest, FlingScrollBubblesToInner) { |
EXPECT_VECTOR_EQ(outer_expected, outer_scroll->CurrentScrollOffset()); |
// Make sure the fling goes to the outer viewport first |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, host_impl_->FlingScrollBegin()); |
gfx::Vector2d scroll_delta(inner_viewport.width(), inner_viewport.height()); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
@@ -7799,9 +7827,9 @@ TEST_F(LayerTreeHostImplVirtualViewportTest, FlingScrollBubblesToInner) { |
EXPECT_VECTOR_EQ(outer_expected, outer_scroll->CurrentScrollOffset()); |
// Fling past the outer viewport boundry, make sure inner viewport scrolls. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, host_impl_->FlingScrollBegin()); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |
outer_expected += gfx::Vector2dF(scroll_delta.x(), scroll_delta.y()); |
@@ -7834,9 +7862,9 @@ TEST_F(LayerTreeHostImplVirtualViewportTest, |
EXPECT_VECTOR_EQ(outer_expected, outer_scroll->CurrentScrollOffset()); |
// Make sure the scroll goes to the outer viewport first. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, host_impl_->FlingScrollBegin()); |
// Scroll near the edge of the outer viewport. |
gfx::Vector2d scroll_delta(inner_viewport.width(), inner_viewport.height()); |
@@ -7880,8 +7908,8 @@ TEST_F(LayerTreeHostImplVirtualViewportTest, |
scoped_ptr<ScrollAndScaleSet> scroll_info; |
gfx::Vector2d scroll_delta(0, inner_viewport.height()); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture)); |
EXPECT_TRUE(host_impl_->ScrollBy(gfx::Point(), scroll_delta).did_scroll); |
// The child should have scrolled up to its limit. |
@@ -7892,7 +7920,7 @@ TEST_F(LayerTreeHostImplVirtualViewportTest, |
// The first |ScrollBy| after the fling should re-lock the scrolling |
// layer to the first layer that scrolled, the inner viewport scroll layer. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, host_impl_->FlingScrollBegin()); |
+ EXPECT_EQ(InputHandler::ScrollStarted, host_impl_->FlingScrollBegin()); |
EXPECT_TRUE(host_impl_->ScrollBy(gfx::Point(), scroll_delta).did_scroll); |
EXPECT_EQ(host_impl_->CurrentlyScrollingLayer(), inner_scroll); |
@@ -7968,7 +7996,7 @@ TEST_F(LayerTreeHostImplTest, ScrollAnimated) { |
base::TimeTicks start_time = |
base::TimeTicks() + base::TimeDelta::FromMilliseconds(100); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50))); |
LayerImpl* scrolling_layer = host_impl_->CurrentlyScrollingLayer(); |
@@ -7985,7 +8013,7 @@ TEST_F(LayerTreeHostImplTest, ScrollAnimated) { |
EXPECT_TRUE(y > 1 && y < 49); |
// Update target. |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
host_impl_->ScrollAnimated(gfx::Point(), gfx::Vector2d(0, 50))); |
host_impl_->Animate(start_time + base::TimeDelta::FromMilliseconds(200)); |
@@ -8328,15 +8356,15 @@ TEST_F(LayerTreeHostImplTest, WheelScrollWithPageScaleFactorOnInnerLayer) { |
scroll_layer->SetScrollDelta(gfx::Vector2d()); |
float page_scale_delta = 2.f; |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::GESTURE); |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Gesture); |
host_impl_->PinchGestureBegin(); |
host_impl_->PinchGestureUpdate(page_scale_delta, gfx::Point()); |
host_impl_->PinchGestureEnd(); |
host_impl_->ScrollEnd(); |
gfx::Vector2dF scroll_delta(0, 5); |
- EXPECT_EQ(InputHandler::SCROLL_STARTED, |
- host_impl_->ScrollBegin(gfx::Point(), InputHandler::WHEEL)); |
+ EXPECT_EQ(InputHandler::ScrollStarted, |
+ host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
EXPECT_VECTOR_EQ(gfx::Vector2dF(), scroll_layer->CurrentScrollOffset()); |
host_impl_->ScrollBy(gfx::Point(), scroll_delta); |