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()); |