| Index: cc/trees/layer_tree_host_common_unittest.cc
 | 
| diff --git a/cc/trees/layer_tree_host_common_unittest.cc b/cc/trees/layer_tree_host_common_unittest.cc
 | 
| index 4f682fef0b73a54772413f8a31b6dff1399de677..1efc1103bbe68e7059663230f0d2e8d4deed171f 100644
 | 
| --- a/cc/trees/layer_tree_host_common_unittest.cc
 | 
| +++ b/cc/trees/layer_tree_host_common_unittest.cc
 | 
| @@ -85,7 +85,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForNoOpLayer) {
 | 
|    parent->AddChild(child);
 | 
|    child->AddChild(grand_child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -129,7 +129,7 @@ TEST_F(LayerTreeHostCommonTest, DoNotSkipLayersWithHandlers) {
 | 
|    parent->AddChild(child);
 | 
|    child->AddChild(grand_child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -182,7 +182,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleLayer) {
 | 
|                                 false);
 | 
|    root->AddChild(layer);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // Case 2: Setting the bounds of the layer should not affect either the draw
 | 
| @@ -391,7 +391,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSimpleHierarchy) {
 | 
|    parent->AddChild(child);
 | 
|    child->AddChild(grand_child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // One-time setup of root layer
 | 
| @@ -518,7 +518,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForSingleRenderSurface) {
 | 
|    parent->AddChild(child);
 | 
|    child->AddChild(grand_child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // One-time setup of root layer
 | 
| @@ -615,7 +615,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForReplica) {
 | 
|    child->AddChild(grand_child);
 | 
|    child->SetReplicaLayer(child_replica.get());
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // One-time setup of root layer
 | 
| @@ -736,7 +736,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForRenderSurfaceHierarchy) {
 | 
|    render_surface1->SetReplicaLayer(replica_of_rs1.get());
 | 
|    render_surface2->SetReplicaLayer(replica_of_rs2.get());
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // In combination with descendant draws content, opacity != 1 forces the layer
 | 
| @@ -1031,7 +1031,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForFlatteningLayer) {
 | 
|    child->AddChild(grand_child);
 | 
|    child->SetForceRenderSurface(true);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // No layers in this test should preserve 3d.
 | 
| @@ -1110,7 +1110,7 @@ TEST_F(LayerTreeHostCommonTest, TransformsForDegenerateIntermediateLayer) {
 | 
|    child->AddChild(grand_child);
 | 
|    child->SetForceRenderSurface(true);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -1135,7 +1135,7 @@ TEST_F(LayerTreeHostCommonTest, TransformAboveRootLayer) {
 | 
|    child->SetScrollClipLayerId(root->id());
 | 
|    root->AddChild(child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    SetLayerPropertiesForTesting(root.get(),
 | 
| @@ -1282,7 +1282,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    scoped_refptr<LayerWithForcedDrawsContent> child =
 | 
|        make_scoped_refptr(new LayerWithForcedDrawsContent());
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    const gfx::Transform identity_matrix;
 | 
| @@ -1336,7 +1336,7 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceListForTransparentChild) {
 | 
|    scoped_refptr<LayerWithForcedDrawsContent> child =
 | 
|        make_scoped_refptr(new LayerWithForcedDrawsContent());
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    const gfx::Transform identity_matrix;
 | 
| @@ -1383,7 +1383,7 @@ TEST_F(LayerTreeHostCommonTest, ForceRenderSurface) {
 | 
|        make_scoped_refptr(new LayerWithForcedDrawsContent());
 | 
|    render_surface1->SetForceRenderSurface(true);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    const gfx::Transform identity_matrix;
 | 
| @@ -1472,7 +1472,7 @@ TEST_F(LayerTreeHostCommonTest, ClipRectCullsRenderSurfaces) {
 | 
|    child->AddChild(grand_child);
 | 
|    grand_child->AddChild(great_grand_child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    // leaf_node1 ensures that parent and child are kept on the
 | 
| @@ -1570,7 +1570,7 @@ TEST_F(LayerTreeHostCommonTest, ClipRectCullsSurfaceWithoutVisibleContent) {
 | 
|    child->AddChild(grand_child);
 | 
|    grand_child->AddChild(leaf_node);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    SetLayerPropertiesForTesting(parent.get(),
 | 
| @@ -1672,7 +1672,7 @@ TEST_F(LayerTreeHostCommonTest, IsClippedIsSetCorrectly) {
 | 
|    child2->AddChild(leaf_node2);
 | 
|    grand_child->AddChild(leaf_node1);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    child2->SetForceRenderSurface(true);
 | 
| @@ -1830,7 +1830,7 @@ TEST_F(LayerTreeHostCommonTest, DrawableContentRectForLayers) {
 | 
|    child->AddChild(grand_child3);
 | 
|    child->AddChild(grand_child4);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    SetLayerPropertiesForTesting(parent.get(),
 | 
| @@ -1931,7 +1931,7 @@ TEST_F(LayerTreeHostCommonTest, ClipRectIsPropagatedCorrectlyToSurfaces) {
 | 
|    child->AddChild(grand_child3);
 | 
|    child->AddChild(grand_child4);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    // the leaf nodes ensure that these grand_children become render surfaces for
 | 
| @@ -2068,7 +2068,7 @@ TEST_F(LayerTreeHostCommonTest, AnimationsForRenderSurfaceHierarchy) {
 | 
|    child_of_rs1->AddChild(grand_child_of_rs1);
 | 
|    child_of_rs2->AddChild(grand_child_of_rs2);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    // Make our render surfaces.
 | 
| @@ -2556,7 +2556,7 @@ TEST_F(LayerTreeHostCommonTest, DrawableAndVisibleContentRectsForSimpleLayers) {
 | 
|    root->AddChild(child2);
 | 
|    root->AddChild(child3);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -2624,7 +2624,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    child->AddChild(grand_child2);
 | 
|    child->AddChild(grand_child3);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -2705,7 +2705,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    render_surface1->AddChild(child2);
 | 
|    render_surface1->AddChild(child3);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -2781,7 +2781,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|        make_scoped_refptr(new LayerWithForcedDrawsContent());
 | 
|    root->AddChild(child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // Case 1: a truly degenerate matrix
 | 
| @@ -2855,7 +2855,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|        make_scoped_refptr(new LayerWithForcedDrawsContent());
 | 
|    root->AddChild(child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -2899,7 +2899,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|         SingularNonAnimatingTransformDoesNotPreventClearingDrawProperties) {
 | 
|    scoped_refptr<Layer> root = Layer::Create();
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -2938,7 +2938,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    render_surface1->AddChild(child2);
 | 
|    render_surface1->AddChild(child3);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -3028,7 +3028,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    render_surface2->AddChild(child2);
 | 
|    render_surface2->AddChild(child3);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -3128,7 +3128,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    root->AddChild(render_surface1);
 | 
|    render_surface1->AddChild(child1);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -3199,7 +3199,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    root->AddChild(render_surface1);
 | 
|    render_surface1->AddChild(child1);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -3274,7 +3274,7 @@ TEST_F(LayerTreeHostCommonTest, DrawableAndVisibleContentRectsInHighDPI) {
 | 
|    render_surface2->AddChild(child2);
 | 
|    render_surface2->AddChild(child3);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -3401,7 +3401,7 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithoutPreserves3d) {
 | 
|    back_facing_surface->AddChild(front_facing_child_of_back_facing_surface);
 | 
|    back_facing_surface->AddChild(back_facing_child_of_back_facing_surface);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    // Nothing is double-sided
 | 
| @@ -3607,7 +3607,7 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithPreserves3d) {
 | 
|    back_facing_surface->AddChild(front_facing_child_of_back_facing_surface);
 | 
|    back_facing_surface->AddChild(back_facing_child_of_back_facing_surface);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    // Nothing is double-sided
 | 
| @@ -3773,7 +3773,7 @@ TEST_F(LayerTreeHostCommonTest, BackFaceCullingWithAnimatingTransforms) {
 | 
|    parent->AddChild(animating_child);
 | 
|    parent->AddChild(child2);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    // Nothing is double-sided
 | 
| @@ -3919,7 +3919,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    front_facing_surface->AddChild(child1);
 | 
|    back_facing_surface->AddChild(child2);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    // RenderSurfaces are not double-sided
 | 
| @@ -4087,7 +4087,7 @@ TEST_F(LayerTreeHostCommonTest, LayerTransformsInHighDPI) {
 | 
|    parent->AddChild(child_empty);
 | 
|    parent->AddChild(child_no_scale);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    float device_scale_factor = 2.5f;
 | 
| @@ -4225,7 +4225,7 @@ TEST_F(LayerTreeHostCommonTest, SurfaceLayerTransformsInHighDPI) {
 | 
|    parent->AddChild(scale_surface);
 | 
|    root->AddChild(parent);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    float device_scale_factor = 2.5f;
 | 
| @@ -4324,7 +4324,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    parent->AddChild(child);
 | 
|    parent->AddChild(child_no_scale);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    float device_scale_factor = 1.7f;
 | 
| @@ -4462,7 +4462,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScale) {
 | 
|    parent->AddChild(child_empty);
 | 
|    parent->AddChild(child_no_scale);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    float device_scale_factor = 2.5f;
 | 
| @@ -4646,7 +4646,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    parent->AddChild(child_empty);
 | 
|    parent->AddChild(child_no_scale);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    RenderSurfaceLayerList render_surface_layer_list;
 | 
| @@ -4728,7 +4728,7 @@ TEST_F(LayerTreeHostCommonTest, SmallContentsScale) {
 | 
|  
 | 
|    parent->AddChild(child_scale);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    float device_scale_factor = 2.5f;
 | 
| @@ -4876,7 +4876,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForSurfaces) {
 | 
|    surface_no_scale->AddChild(surface_no_scale_child_scale);
 | 
|    surface_no_scale->AddChild(surface_no_scale_child_no_scale);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    SkMScalar device_scale_factor = 5;
 | 
| @@ -5077,7 +5077,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    surface_no_scale->AddChild(surface_no_scale_child_scale);
 | 
|    surface_no_scale->AddChild(surface_no_scale_child_no_scale);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    RenderSurfaceLayerList render_surface_layer_list;
 | 
| @@ -5220,7 +5220,7 @@ TEST_F(LayerTreeHostCommonTest, ContentsScaleForAnimatingLayer) {
 | 
|  
 | 
|    parent->AddChild(child_scale);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // Now put an animating transform on child.
 | 
| @@ -5265,7 +5265,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    scoped_refptr<Layer> child = CreateDrawableContentLayer(&delegate);
 | 
|    root->AddChild(child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Transform identity_matrix;
 | 
| @@ -5359,7 +5359,7 @@ TEST_F(LayerTreeHostCommonTest, RenderSurfaceTransformsInHighDPI) {
 | 
|    child->AddChild(duplicate_child_non_owner);
 | 
|    child->SetReplicaLayer(replica.get());
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    RenderSurfaceLayerList render_surface_layer_list;
 | 
| @@ -5494,7 +5494,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    child->AddChild(duplicate_child_non_owner);
 | 
|    child->SetReplicaLayer(replica.get());
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(parent);
 | 
|  
 | 
|    float device_scale_factor = 1.7f;
 | 
| @@ -5559,7 +5559,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeSearch) {
 | 
|    child->SetMaskLayer(mask_layer.get());
 | 
|    root->AddChild(child.get());
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    int nonexistent_id = -1;
 | 
| @@ -5613,7 +5613,7 @@ TEST_F(LayerTreeHostCommonTest, TransparentChildRenderSurfaceCreation) {
 | 
|    child->AddChild(grand_child);
 | 
|    child->SetOpacity(0.5f);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -5706,7 +5706,7 @@ class LCDTextTest
 | 
|  
 | 
|      child_->SetForceRenderSurface(std::tr1::get<1>(GetParam()));
 | 
|  
 | 
| -    host_ = FakeLayerTreeHost::Create();
 | 
| +    host_ = CreateFakeLayerTreeHost();
 | 
|      host_->SetRootLayer(root_);
 | 
|    }
 | 
|  
 | 
| @@ -5862,7 +5862,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayer) {
 | 
|    child->AddChild(grand_child);
 | 
|    root->AddChild(child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    RenderSurfaceLayerList render_surface_layer_list;
 | 
| @@ -5976,7 +5976,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHidden_TwoLayers) {
 | 
|    child->AddChild(grand_child);
 | 
|    root->AddChild(child);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    RenderSurfaceLayerList render_surface_layer_list;
 | 
| @@ -6134,7 +6134,7 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
 | 
|    root->AddChild(copy_grand_parent);
 | 
|    root->AddChild(copy_grand_parent_sibling_after);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    // Hide the copy_grand_parent and its subtree. But make a copy request in that
 | 
| @@ -6248,7 +6248,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedOutCopyRequest) {
 | 
|    copy_parent->AddChild(copy_layer);
 | 
|    root->AddChild(copy_parent);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    copy_layer->RequestCopyOfOutput(CopyOutputRequest::CreateRequest(
 | 
| @@ -6312,7 +6312,7 @@ TEST_F(LayerTreeHostCommonTest, VisibleContentRectInsideSurface) {
 | 
|    surface->AddChild(surface_child);
 | 
|    root->AddChild(surface);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    RenderSurfaceLayerList render_surface_layer_list;
 | 
| @@ -6399,7 +6399,7 @@ TEST_F(LayerTreeHostCommonTest, TransformedClipParent) {
 | 
|                                 true,
 | 
|                                 false);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -6510,7 +6510,7 @@ TEST_F(LayerTreeHostCommonTest, ClipParentWithInterveningRenderSurface) {
 | 
|                                 true,
 | 
|                                 false);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -6639,7 +6639,7 @@ TEST_F(LayerTreeHostCommonTest, ClipParentScrolledInterveningLayer) {
 | 
|                                 true,
 | 
|                                 false);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -6748,7 +6748,7 @@ TEST_F(LayerTreeHostCommonTest, DescendantsOfClipChildren) {
 | 
|                                 true,
 | 
|                                 false);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -6845,7 +6845,7 @@ TEST_F(LayerTreeHostCommonTest,
 | 
|    render_surface1->SetForceRenderSurface(true);
 | 
|    render_surface2->SetForceRenderSurface(true);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -7001,7 +7001,7 @@ TEST_F(LayerTreeHostCommonTest, DoNotIncludeBackfaceInvisibleSurfaces) {
 | 
|    render_surface->SetDoubleSided(false);
 | 
|    render_surface->SetForceRenderSurface(true);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -7092,7 +7092,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedByScrollParent) {
 | 
|                                 true,
 | 
|                                 false);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -7141,7 +7141,7 @@ TEST_F(LayerTreeHostCommonTest, SingularTransformSubtreesDoNotDraw) {
 | 
|                                 true);
 | 
|    child->SetForceRenderSurface(true);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -7233,7 +7233,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedByOutOfOrderScrollParent) {
 | 
|                                 true,
 | 
|                                 false);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -7346,7 +7346,7 @@ TEST_F(LayerTreeHostCommonTest, ClippedByOutOfOrderScrollGrandparent) {
 | 
|                                 true,
 | 
|                                 false);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    ExecuteCalculateDrawProperties(root.get());
 | 
| @@ -7495,7 +7495,7 @@ TEST_F(LayerTreeHostCommonTest, OutOfOrderClippingRequiresRSLLSorting) {
 | 
|                                 true,
 | 
|                                 false);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  scoped_ptr<FakeLayerTreeHost> host(CreateFakeLayerTreeHost());
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    RenderSurfaceLayerList render_surface_layer_list;
 | 
| @@ -8593,7 +8593,8 @@ TEST_F(LayerTreeHostCommonTest, VisibleContentRectInChildRenderSurface) {
 | 
|    root->AddChild(clip);
 | 
|    clip->AddChild(content);
 | 
|  
 | 
| -  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create();
 | 
| +  FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
 | 
| +  scoped_ptr<FakeLayerTreeHost> host = FakeLayerTreeHost::Create(&client);
 | 
|    host->SetRootLayer(root);
 | 
|  
 | 
|    gfx::Size device_viewport_size(768, 582);
 | 
| 
 |