| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_utils.h" | 5 #include "cc/layers/layer_utils.h" |
| 6 | 6 |
| 7 #include "cc/animation/transform_operations.h" | 7 #include "cc/animation/transform_operations.h" |
| 8 #include "cc/layers/layer_impl.h" | 8 #include "cc/layers/layer_impl.h" |
| 9 #include "cc/test/animation_test_common.h" | 9 #include "cc/test/animation_test_common.h" |
| 10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
| 11 #include "cc/test/fake_layer_tree_host_impl.h" | 11 #include "cc/test/fake_layer_tree_host_impl.h" |
| 12 #include "cc/test/test_shared_bitmap_manager.h" | 12 #include "cc/test/test_shared_bitmap_manager.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "ui/gfx/box_f.h" | 14 #include "ui/gfx/geometry/box_f.h" |
| 15 #include "ui/gfx/test/gfx_util.h" | 15 #include "ui/gfx/test/gfx_util.h" |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 float diagonal(float width, float height) { | 20 float diagonal(float width, float height) { |
| 21 return std::sqrt(width * width + height * height); | 21 return std::sqrt(width * width + height * height); |
| 22 } | 22 } |
| 23 | 23 |
| 24 class LayerUtilsGetAnimationBoundsTest : public testing::Test { | 24 class LayerUtilsGetAnimationBoundsTest : public testing::Test { |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 child()->SetPosition(gfx::PointF(150.f, 50.f)); | 258 child()->SetPosition(gfx::PointF(150.f, 50.f)); |
| 259 child()->SetBounds(bounds); | 259 child()->SetBounds(bounds); |
| 260 | 260 |
| 261 gfx::BoxF box; | 261 gfx::BoxF box; |
| 262 bool success = LayerUtils::GetAnimationBounds(*child(), &box); | 262 bool success = LayerUtils::GetAnimationBounds(*child(), &box); |
| 263 EXPECT_FALSE(success); | 263 EXPECT_FALSE(success); |
| 264 } | 264 } |
| 265 | 265 |
| 266 } // namespace | 266 } // namespace |
| 267 } // namespace cc | 267 } // namespace cc |
| OLD | NEW |