OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/nine_patch_layer.h" | 5 #include "cc/layers/nine_patch_layer.h" |
6 | 6 |
7 #include "cc/resources/prioritized_resource_manager.h" | 7 #include "cc/resources/prioritized_resource_manager.h" |
8 #include "cc/resources/resource_provider.h" | 8 #include "cc/resources/resource_provider.h" |
9 #include "cc/resources/resource_update_queue.h" | 9 #include "cc/resources/resource_update_queue.h" |
10 #include "cc/resources/scoped_ui_resource.h" | 10 #include "cc/resources/scoped_ui_resource.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 void TearDown() override { | 41 void TearDown() override { |
42 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); | 42 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); |
43 } | 43 } |
44 | 44 |
45 FakeLayerTreeHostClient fake_client_; | 45 FakeLayerTreeHostClient fake_client_; |
46 scoped_ptr<FakeLayerTreeHost> layer_tree_host_; | 46 scoped_ptr<FakeLayerTreeHost> layer_tree_host_; |
47 }; | 47 }; |
48 | 48 |
49 TEST_F(NinePatchLayerTest, SetLayerProperties) { | 49 TEST_F(NinePatchLayerTest, SetLayerProperties) { |
50 scoped_refptr<NinePatchLayer> test_layer = NinePatchLayer::Create(); | 50 scoped_refptr<NinePatchLayer> test_layer = |
| 51 NinePatchLayer::Create(LayerSettings()); |
51 ASSERT_TRUE(test_layer.get()); | 52 ASSERT_TRUE(test_layer.get()); |
52 test_layer->SetIsDrawable(true); | 53 test_layer->SetIsDrawable(true); |
53 test_layer->SetBounds(gfx::Size(100, 100)); | 54 test_layer->SetBounds(gfx::Size(100, 100)); |
54 | 55 |
55 layer_tree_host_->SetRootLayer(test_layer); | 56 layer_tree_host_->SetRootLayer(test_layer); |
56 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); | 57 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); |
57 EXPECT_EQ(test_layer->layer_tree_host(), layer_tree_host_.get()); | 58 EXPECT_EQ(test_layer->layer_tree_host(), layer_tree_host_.get()); |
58 | 59 |
59 ResourceUpdateQueue queue; | 60 ResourceUpdateQueue queue; |
60 gfx::Rect screen_space_clip_rect; | 61 gfx::Rect screen_space_clip_rect; |
(...skipping 11 matching lines...) Expand all Loading... |
72 test_layer->SetAperture(aperture); | 73 test_layer->SetAperture(aperture); |
73 test_layer->SetUIResourceId(resource->id()); | 74 test_layer->SetUIResourceId(resource->id()); |
74 test_layer->SetFillCenter(fill_center); | 75 test_layer->SetFillCenter(fill_center); |
75 test_layer->Update(&queue, &occlusion_tracker); | 76 test_layer->Update(&queue, &occlusion_tracker); |
76 | 77 |
77 EXPECT_TRUE(test_layer->DrawsContent()); | 78 EXPECT_TRUE(test_layer->DrawsContent()); |
78 } | 79 } |
79 | 80 |
80 } // namespace | 81 } // namespace |
81 } // namespace cc | 82 } // namespace cc |
OLD | NEW |