Index: cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc |
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc b/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc |
index b4c1160b081bae8f1cc600f8c4335e0efed434fa..c0e234f4627e58ddc8b57050662a225442350287 100644 |
--- a/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc |
+++ b/cc/animation/scrollbar_animation_controller_linear_fade_unittest.cc |
@@ -21,20 +21,25 @@ class ScrollbarAnimationControllerLinearFadeTest : public testing::Test { |
scroll_layer_ = LayerImpl::Create(host_impl_.active_tree(), 1); |
scrollbar_layer_ = PaintedScrollbarLayerImpl::Create( |
host_impl_.active_tree(), 2, HORIZONTAL); |
+ clip_layer_ = LayerImpl::Create(host_impl_.active_tree(), 3); |
+ scroll_layer_->SetScrollable(clip_layer_->id()); |
- scroll_layer_->SetMaxScrollOffset(gfx::Vector2d(50, 50)); |
+ clip_layer_->SetBounds(gfx::Size(100, 100)); // MaxScrollOffset = (50, 50). |
scroll_layer_->SetBounds(gfx::Size(50, 50)); |
- scroll_layer_->SetHorizontalScrollbarLayer(scrollbar_layer_.get()); |
+ clip_layer_->AddScrollbar(scrollbar_layer_.get()); |
+ scroll_layer_->AddScrollbar(scrollbar_layer_.get()); |
scrollbar_controller_ = ScrollbarAnimationControllerLinearFade::Create( |
scroll_layer_.get(), |
base::TimeDelta::FromSeconds(2), |
base::TimeDelta::FromSeconds(3)); |
+ clip_layer_->AddChild(scroll_layer_.Pass()); |
} |
FakeImplProxy proxy_; |
FakeLayerTreeHostImpl host_impl_; |
scoped_ptr<ScrollbarAnimationControllerLinearFade> scrollbar_controller_; |
+ scoped_ptr<LayerImpl> clip_layer_; |
scoped_ptr<LayerImpl> scroll_layer_; |
scoped_ptr<PaintedScrollbarLayerImpl> scrollbar_layer_; |
}; |