Index: cc/trees/layer_tree_host_unittest.cc |
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc |
index d01fbae1778d0fa4868c59028916ac7c31c1dd4d..a18be95532c301770f22907962ef208b0cb91e39 100644 |
--- a/cc/trees/layer_tree_host_unittest.cc |
+++ b/cc/trees/layer_tree_host_unittest.cc |
@@ -398,7 +398,7 @@ class LayerTreeHostTestNoExtraCommitFromScrollbarInvalidate |
bool paint_scrollbar = true; |
bool has_thumb = false; |
scrollbar_ = FakePaintedScrollbarLayer::Create( |
- paint_scrollbar, has_thumb, root_layer_->id()); |
+ paint_scrollbar, has_thumb, root_layer_.get()); |
scrollbar_->SetPosition(gfx::Point(0, 10)); |
scrollbar_->SetBounds(gfx::Size(10, 10)); |
@@ -1149,9 +1149,17 @@ class LayerTreeHostTestStartPageScaleAnimation |
scroll_layer_ = FakeContentLayer::Create(&client_); |
} |
- scroll_layer_->SetScrollable(true); |
+ Layer* root_layer = layer_tree_host()->root_layer(); |
+ scroll_layer_->SetScrollClipLayer(root_layer); |
+ scroll_layer_->SetIsContainerForFixedPositionLayers(true); |
+ scroll_layer_->SetBounds(gfx::Size(2 * root_layer->bounds().width(), |
+ 2 * root_layer->bounds().height())); |
scroll_layer_->SetScrollOffset(gfx::Vector2d()); |
layer_tree_host()->root_layer()->AddChild(scroll_layer_); |
+ // This test requires the page_scale and inner viewport layers to be |
+ // identified. |
+ layer_tree_host()->RegisterViewportLayers( |
+ root_layer, scroll_layer_.get(), NULL); |
layer_tree_host()->SetPageScaleFactorAndLimits(1.f, 0.5f, 2.f); |
} |
@@ -1462,7 +1470,7 @@ class LayerTreeHostTestDirectRendererAtomicCommit : public LayerTreeHostTest { |
bool paint_scrollbar = true; |
bool has_thumb = false; |
scrollbar_ = FakePaintedScrollbarLayer::Create( |
- paint_scrollbar, has_thumb, layer_->id()); |
+ paint_scrollbar, has_thumb, layer_); |
scrollbar_->SetPosition(gfx::Point(0, 10)); |
scrollbar_->SetBounds(gfx::Size(10, 10)); |
@@ -3458,7 +3466,7 @@ class LayerTreeHostTestPropertyChangesDuringUpdateArePushed |
bool paint_scrollbar = true; |
bool has_thumb = false; |
scrollbar_layer_ = FakePaintedScrollbarLayer::Create( |
- paint_scrollbar, has_thumb, root_->id()); |
+ paint_scrollbar, has_thumb, root_.get()); |
root_->AddChild(scrollbar_layer_); |