| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/layers/layer.h" | 5 #include "cc/layers/layer.h" |
| 6 | 6 |
| 7 #include "cc/animation/keyframed_animation_curve.h" | 7 #include "cc/animation/keyframed_animation_curve.h" |
| 8 #include "cc/base/math_util.h" | 8 #include "cc/base/math_util.h" |
| 9 #include "cc/layers/layer_impl.h" | 9 #include "cc/layers/layer_impl.h" |
| 10 #include "cc/resources/layer_painter.h" | 10 #include "cc/resources/layer_painter.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); | 126 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); |
| 127 | 127 |
| 128 VerifyTestTreeInitialState(); | 128 VerifyTestTreeInitialState(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 FakeImplProxy proxy_; | 131 FakeImplProxy proxy_; |
| 132 TestSharedBitmapManager shared_bitmap_manager_; | 132 TestSharedBitmapManager shared_bitmap_manager_; |
| 133 FakeLayerTreeHostImpl host_impl_; | 133 FakeLayerTreeHostImpl host_impl_; |
| 134 | 134 |
| 135 FakeLayerTreeHostClient fake_client_; | 135 FakeLayerTreeHostClient fake_client_; |
| 136 scoped_ptr<StrictMock<MockLayerTreeHost> > layer_tree_host_; | 136 scoped_ptr<StrictMock<MockLayerTreeHost>> layer_tree_host_; |
| 137 scoped_refptr<Layer> parent_; | 137 scoped_refptr<Layer> parent_; |
| 138 scoped_refptr<Layer> child1_; | 138 scoped_refptr<Layer> child1_; |
| 139 scoped_refptr<Layer> child2_; | 139 scoped_refptr<Layer> child2_; |
| 140 scoped_refptr<Layer> child3_; | 140 scoped_refptr<Layer> child3_; |
| 141 scoped_refptr<Layer> grand_child1_; | 141 scoped_refptr<Layer> grand_child1_; |
| 142 scoped_refptr<Layer> grand_child2_; | 142 scoped_refptr<Layer> grand_child2_; |
| 143 scoped_refptr<Layer> grand_child3_; | 143 scoped_refptr<Layer> grand_child3_; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 TEST_F(LayerTest, BasicCreateAndDestroy) { | 146 TEST_F(LayerTest, BasicCreateAndDestroy) { |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 root_layer->AddChild(becomes_not_draws_content); | 1245 root_layer->AddChild(becomes_not_draws_content); |
| 1246 EXPECT_EQ(0, root_layer->NumDescendantsThatDrawContent()); | 1246 EXPECT_EQ(0, root_layer->NumDescendantsThatDrawContent()); |
| 1247 | 1247 |
| 1248 becomes_draws_content->SetIsDrawable(true); | 1248 becomes_draws_content->SetIsDrawable(true); |
| 1249 root_layer->AddChild(becomes_draws_content); | 1249 root_layer->AddChild(becomes_draws_content); |
| 1250 EXPECT_EQ(1, root_layer->NumDescendantsThatDrawContent()); | 1250 EXPECT_EQ(1, root_layer->NumDescendantsThatDrawContent()); |
| 1251 } | 1251 } |
| 1252 | 1252 |
| 1253 } // namespace | 1253 } // namespace |
| 1254 } // namespace cc | 1254 } // namespace cc |
| OLD | NEW |