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/animation/layer_animation_controller.h" | 5 #include "cc/animation/layer_animation_controller.h" |
6 | 6 |
7 #include "cc/animation/animation.h" | 7 #include "cc/animation/animation.h" |
8 #include "cc/animation/animation_curve.h" | 8 #include "cc/animation/animation_curve.h" |
9 #include "cc/animation/keyframed_animation_curve.h" | 9 #include "cc/animation/keyframed_animation_curve.h" |
10 #include "cc/animation/transform_operations.h" | 10 #include "cc/animation/transform_operations.h" |
11 #include "cc/test/animation_test_common.h" | 11 #include "cc/test/animation_test_common.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationDelegat
e.h" | 14 #include "third_party/WebKit/public/platform/WebAnimationDelegate.h" |
15 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
16 | 16 |
17 namespace cc { | 17 namespace cc { |
18 namespace { | 18 namespace { |
19 | 19 |
20 void ExpectTranslateX(double translate_x, const gfx::Transform& matrix) { | 20 void ExpectTranslateX(double translate_x, const gfx::Transform& matrix) { |
21 EXPECT_FLOAT_EQ(translate_x, matrix.matrix().getDouble(0, 3)); } | 21 EXPECT_FLOAT_EQ(translate_x, matrix.matrix().getDouble(0, 3)); } |
22 | 22 |
23 scoped_ptr<Animation> CreateAnimation(scoped_ptr<AnimationCurve> curve, | 23 scoped_ptr<Animation> CreateAnimation(scoped_ptr<AnimationCurve> curve, |
24 int id, | 24 int id, |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 EXPECT_EQ(0.5f, dummy.opacity()); | 1151 EXPECT_EQ(0.5f, dummy.opacity()); |
1152 | 1152 |
1153 // The animation should now tick past its starting point. | 1153 // The animation should now tick past its starting point. |
1154 controller->Animate(3.5); | 1154 controller->Animate(3.5); |
1155 EXPECT_NE(0.5f, inactive_dummy.opacity()); | 1155 EXPECT_NE(0.5f, inactive_dummy.opacity()); |
1156 EXPECT_NE(0.5f, dummy.opacity()); | 1156 EXPECT_NE(0.5f, dummy.opacity()); |
1157 } | 1157 } |
1158 | 1158 |
1159 } // namespace | 1159 } // namespace |
1160 } // namespace cc | 1160 } // namespace cc |
OLD | NEW |