| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <limits> | 5 #include <limits> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "cc/animation/transform_operations.h" | 9 #include "cc/animation/transform_operations.h" |
| 10 #include "cc/test/geometry_test_utils.h" | 10 #include "cc/test/geometry_test_utils.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "ui/gfx/animation/tween.h" | 12 #include "ui/gfx/animation/tween.h" |
| 13 #include "ui/gfx/box_f.h" | 13 #include "ui/gfx/geometry/box_f.h" |
| 14 #include "ui/gfx/geometry/rect_conversions.h" |
| 14 #include "ui/gfx/geometry/vector3d_f.h" | 15 #include "ui/gfx/geometry/vector3d_f.h" |
| 15 #include "ui/gfx/rect_conversions.h" | |
| 16 | 16 |
| 17 namespace cc { | 17 namespace cc { |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 TEST(TransformOperationTest, TransformTypesAreUnique) { | 20 TEST(TransformOperationTest, TransformTypesAreUnique) { |
| 21 ScopedVector<TransformOperations> transforms; | 21 ScopedVector<TransformOperations> transforms; |
| 22 | 22 |
| 23 TransformOperations* to_add = new TransformOperations(); | 23 TransformOperations* to_add = new TransformOperations(); |
| 24 to_add->AppendTranslate(1, 0, 0); | 24 to_add->AppendTranslate(1, 0, 0); |
| 25 transforms.push_back(to_add); | 25 transforms.push_back(to_add); |
| (...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 | 1454 |
| 1455 // Scale + Perspective can't. | 1455 // Scale + Perspective can't. |
| 1456 TransformOperations operations11; | 1456 TransformOperations operations11; |
| 1457 operations11.AppendScale(2.f, 2.f, 2.f); | 1457 operations11.AppendScale(2.f, 2.f, 2.f); |
| 1458 operations11.AppendPerspective(1.f); | 1458 operations11.AppendPerspective(1.f); |
| 1459 EXPECT_FALSE(operations11.ScaleComponent(&scale)); | 1459 EXPECT_FALSE(operations11.ScaleComponent(&scale)); |
| 1460 } | 1460 } |
| 1461 | 1461 |
| 1462 } // namespace | 1462 } // namespace |
| 1463 } // namespace cc | 1463 } // namespace cc |
| OLD | NEW |