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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 controller->Animate(3.0); | 1088 controller->Animate(3.0); |
1089 controller->UpdateState(true, events.get()); | 1089 controller->UpdateState(true, events.get()); |
1090 | 1090 |
1091 // The float tranisition should now be done. | 1091 // The float tranisition should now be done. |
1092 EXPECT_EQ(1.f, dummy.opacity()); | 1092 EXPECT_EQ(1.f, dummy.opacity()); |
1093 EXPECT_FALSE(controller->HasActiveAnimation()); | 1093 EXPECT_FALSE(controller->HasActiveAnimation()); |
1094 } | 1094 } |
1095 | 1095 |
1096 } // namespace | 1096 } // namespace |
1097 } // namespace cc | 1097 } // namespace cc |
OLD | NEW |