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

Unified Diff: cc/layers/layer_position_constraint_unittest.cc

Issue 23983047: Pinch/Zoom Infrastructure & Plumbing CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Backup 2013.10.29 Created 7 years, 2 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
Index: cc/layers/layer_position_constraint_unittest.cc
diff --git a/cc/layers/layer_position_constraint_unittest.cc b/cc/layers/layer_position_constraint_unittest.cc
index 8f6dcb11798a5ba1153db4155931a7e8667f7df4..3f9130430349105b62643ca7f8204ca6607bb16b 100644
--- a/cc/layers/layer_position_constraint_unittest.cc
+++ b/cc/layers/layer_position_constraint_unittest.cc
@@ -74,6 +74,8 @@ class LayerPositionConstraintTest : public testing::Test {
scoped_ptr<LayerImpl> CreateTreeForTest() {
scoped_ptr<LayerImpl> root =
+ LayerImpl::Create(host_impl_.active_tree(), 5);
+ scoped_ptr<LayerImpl> scroll_layer =
LayerImpl::Create(host_impl_.active_tree(), 1);
scoped_ptr<LayerImpl> child =
LayerImpl::Create(host_impl_.active_tree(), 2);
@@ -86,7 +88,8 @@ class LayerPositionConstraintTest : public testing::Test {
gfx::PointF anchor;
gfx::PointF position;
gfx::Size bounds(100, 100);
- SetLayerPropertiesForTesting(root.get(),
+ gfx::Size clip_bounds(200, 200);
+ SetLayerPropertiesForTesting(scroll_layer.get(),
IdentityMatrix,
IdentityMatrix,
anchor,
@@ -115,12 +118,11 @@ class LayerPositionConstraintTest : public testing::Test {
bounds,
false);
- root->SetMaxScrollOffset(gfx::Vector2d(100, 100));
- root->SetScrollable(true);
- child->SetMaxScrollOffset(gfx::Vector2d(100, 100));
- child->SetScrollable(true);
- grand_child->SetMaxScrollOffset(gfx::Vector2d(100, 100));
- grand_child->SetScrollable(true);
+ // TODO(wjmaclean) Do we need a separate clip layer for each scroll layer?
+ root->SetBounds(clip_bounds);
+ scroll_layer->SetScrollable(root->id());
+ child->SetScrollable(root->id());
+ grand_child->SetScrollable(root->id());
grand_child->AddChild(great_grand_child.Pass());
child->AddChild(grand_child.Pass());

Powered by Google App Engine
This is Rietveld 408576698