| 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 c915632f2fc8af1dd615662f0acf832f9c61a132..7210ae2e3f77f25f9a99fac729c90dfaff7269d5 100644
|
| --- a/cc/animation/scrollbar_animation_controller_thinning_unittest.cc
|
| +++ b/cc/animation/scrollbar_animation_controller_thinning_unittest.cc
|
| @@ -18,20 +18,28 @@ class ScrollbarAnimationControllerThinningTest : public testing::Test {
|
|
|
| protected:
|
| virtual void SetUp() {
|
| - scroll_layer_ = LayerImpl::Create(host_impl_.active_tree(), 1);
|
| + 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());
|
| +
|
| 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);
|
| + kIsLeftSideVerticalScrollbar, kIsOverlayScrollbar);
|
|
|
| - scroll_layer_->SetMaxScrollOffset(gfx::Vector2d(50, 50));
|
| - scroll_layer_->SetBounds(gfx::Size(50, 50));
|
| - scroll_layer_->SetHorizontalScrollbarLayer(scrollbar_layer_.get());
|
| + 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));
|
|
|
| scrollbar_controller_ = ScrollbarAnimationControllerThinning::CreateForTest(
|
| - scroll_layer_.get(),
|
| + scroll_layer_ptr,
|
| base::TimeDelta::FromSeconds(2),
|
| base::TimeDelta::FromSeconds(3));
|
| }
|
| @@ -39,7 +47,7 @@ class ScrollbarAnimationControllerThinningTest : public testing::Test {
|
| FakeImplProxy proxy_;
|
| FakeLayerTreeHostImpl host_impl_;
|
| scoped_ptr<ScrollbarAnimationControllerThinning> scrollbar_controller_;
|
| - scoped_ptr<LayerImpl> scroll_layer_;
|
| + scoped_ptr<LayerImpl> clip_layer_;
|
| scoped_ptr<SolidColorScrollbarLayerImpl> scrollbar_layer_;
|
| };
|
|
|
|
|