Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1232)

Unified Diff: cc/animation/scrollbar_animation_controller_thinning_unittest.cc

Issue 135183016: Revert of Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/animation/scrollbar_animation_controller_thinning.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « cc/animation/scrollbar_animation_controller_thinning.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698