Chromium Code Reviews| 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 5e51cc37aeefa0f36d6c8e8dd5c1703fb15cb52e..684e1099ccdc35a4e460c0564187cb7b74ad9ec1 100644 |
| --- a/cc/trees/layer_tree_host_impl_unittest.cc |
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc |
| @@ -512,6 +512,20 @@ TEST_F(LayerTreeHostImplTest, ScrollRootCallsCommitAndRedraw) { |
| EXPECT_TRUE(did_request_commit_); |
| } |
| +TEST_F(LayerTreeHostImplTest, ScrollActiveOnlyAfterScrollMovement) { |
| + SetupScrollAndContentsLayers(gfx::Size(100, 100)); |
| + host_impl_->SetViewportSize(gfx::Size(50, 50)); |
| + DrawFrame(); |
| + |
| + EXPECT_EQ(InputHandler::ScrollStarted, |
| + host_impl_->ScrollBegin(gfx::Point(), InputHandler::Wheel)); |
| + EXPECT_FALSE(host_impl_->IsActivelyScrolling()); |
|
brianderson
2014/10/23 22:39:42
Is this the expectation that would fail without yo
jdduke (slow)
2014/10/23 22:45:13
Yup, exactly.
|
| + host_impl_->ScrollBy(gfx::Point(), gfx::Vector2d(0, 10)); |
| + EXPECT_TRUE(host_impl_->IsActivelyScrolling()); |
| + host_impl_->ScrollEnd(); |
| + EXPECT_FALSE(host_impl_->IsActivelyScrolling()); |
| +} |
| + |
| TEST_F(LayerTreeHostImplTest, ScrollWithoutRootLayer) { |
| // We should not crash when trying to scroll an empty layer tree. |
| EXPECT_EQ(InputHandler::ScrollIgnored, |