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/contents_scaling_layer.h" | 5 #include "cc/layers/contents_scaling_layer.h" |
6 | 6 |
| 7 #include <vector> |
| 8 |
7 #include "cc/test/geometry_test_utils.h" | 9 #include "cc/test/geometry_test_utils.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
9 | 11 |
10 namespace cc { | 12 namespace cc { |
11 namespace { | 13 namespace { |
12 | 14 |
13 class MockContentsScalingLayer : public ContentsScalingLayer { | 15 class MockContentsScalingLayer : public ContentsScalingLayer { |
14 public: | 16 public: |
15 MockContentsScalingLayer() | 17 MockContentsScalingLayer() |
16 : ContentsScalingLayer() {} | 18 : ContentsScalingLayer() {} |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 EXPECT_EQ(20, test_layer->content_bounds().width()); | 81 EXPECT_EQ(20, test_layer->content_bounds().width()); |
80 EXPECT_EQ(40, test_layer->content_bounds().height()); | 82 EXPECT_EQ(40, test_layer->content_bounds().height()); |
81 | 83 |
82 CalcDrawProps(root, 1.33f); | 84 CalcDrawProps(root, 1.33f); |
83 EXPECT_EQ(14, test_layer->content_bounds().width()); | 85 EXPECT_EQ(14, test_layer->content_bounds().width()); |
84 EXPECT_EQ(27, test_layer->content_bounds().height()); | 86 EXPECT_EQ(27, test_layer->content_bounds().height()); |
85 } | 87 } |
86 | 88 |
87 } // namespace | 89 } // namespace |
88 } // namespace cc | 90 } // namespace cc |
OLD | NEW |