Index: cc/animation/scrollbar_animation_controller_thinning_unittest.cc |
diff --git a/cc/animation/scrollbar_animation_controller_thinning_unittest.cc b/cc/animation/scrollbar_animation_controller_thinning_unittest.cc |
index 7210ae2e3f77f25f9a99fac729c90dfaff7269d5..c915632f2fc8af1dd615662f0acf832f9c61a132 100644 |
--- a/cc/animation/scrollbar_animation_controller_thinning_unittest.cc |
+++ b/cc/animation/scrollbar_animation_controller_thinning_unittest.cc |
@@ -18,28 +18,20 @@ |
protected: |
virtual void SetUp() { |
- scoped_ptr<LayerImpl> scroll_layer = |
- LayerImpl::Create(host_impl_.active_tree(), 1); |
- clip_layer_ = LayerImpl::Create(host_impl_.active_tree(), 3); |
- scroll_layer->SetScrollClipLayer(clip_layer_->id()); |
- LayerImpl* scroll_layer_ptr = scroll_layer.get(); |
- clip_layer_->AddChild(scroll_layer.Pass()); |
- |
+ scroll_layer_ = LayerImpl::Create(host_impl_.active_tree(), 1); |
const int kId = 2; |
const int kThumbThickness = 10; |
const bool kIsLeftSideVerticalScrollbar = false; |
- const bool kIsOverlayScrollbar = true; |
scrollbar_layer_ = SolidColorScrollbarLayerImpl::Create( |
host_impl_.active_tree(), kId, HORIZONTAL, kThumbThickness, |
- kIsLeftSideVerticalScrollbar, kIsOverlayScrollbar); |
- |
- scrollbar_layer_->SetClipLayerById(clip_layer_->id()); |
- scrollbar_layer_->SetScrollLayerById(scroll_layer_ptr->id()); |
- clip_layer_->SetBounds(gfx::Size(100, 100)); |
- scroll_layer_ptr->SetBounds(gfx::Size(50, 50)); |
+ kIsLeftSideVerticalScrollbar); |
+ |
+ scroll_layer_->SetMaxScrollOffset(gfx::Vector2d(50, 50)); |
+ scroll_layer_->SetBounds(gfx::Size(50, 50)); |
+ scroll_layer_->SetHorizontalScrollbarLayer(scrollbar_layer_.get()); |
scrollbar_controller_ = ScrollbarAnimationControllerThinning::CreateForTest( |
- scroll_layer_ptr, |
+ scroll_layer_.get(), |
base::TimeDelta::FromSeconds(2), |
base::TimeDelta::FromSeconds(3)); |
} |
@@ -47,7 +39,7 @@ |
FakeImplProxy proxy_; |
FakeLayerTreeHostImpl host_impl_; |
scoped_ptr<ScrollbarAnimationControllerThinning> scrollbar_controller_; |
- scoped_ptr<LayerImpl> clip_layer_; |
+ scoped_ptr<LayerImpl> scroll_layer_; |
scoped_ptr<SolidColorScrollbarLayerImpl> scrollbar_layer_; |
}; |