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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
7 #include "webkit/renderer/compositor_bindings/web_animation_impl.h" | 7 #include "webkit/renderer/compositor_bindings/web_animation_impl.h" |
8 #include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" | 8 #include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h" |
9 | 9 |
10 using WebKit::WebAnimation; | 10 using blink::WebAnimation; |
11 using WebKit::WebAnimationCurve; | 11 using blink::WebAnimationCurve; |
12 using WebKit::WebFloatAnimationCurve; | 12 using blink::WebFloatAnimationCurve; |
13 | 13 |
14 namespace webkit { | 14 namespace webkit { |
15 namespace { | 15 namespace { |
16 | 16 |
17 TEST(WebAnimationTest, DefaultSettings) { | 17 TEST(WebAnimationTest, DefaultSettings) { |
18 scoped_ptr<WebAnimationCurve> curve(new WebFloatAnimationCurveImpl()); | 18 scoped_ptr<WebAnimationCurve> curve(new WebFloatAnimationCurveImpl()); |
19 scoped_ptr<WebAnimation> animation( | 19 scoped_ptr<WebAnimation> animation( |
20 new WebAnimationImpl(*curve, WebAnimation::TargetPropertyOpacity, 1, 0)); | 20 new WebAnimationImpl(*curve, WebAnimation::TargetPropertyOpacity, 1, 0)); |
21 | 21 |
22 // Ensure that the defaults are correct. | 22 // Ensure that the defaults are correct. |
(...skipping 13 matching lines...) Expand all Loading... |
36 animation->setAlternatesDirection(true); | 36 animation->setAlternatesDirection(true); |
37 | 37 |
38 EXPECT_EQ(2, animation->iterations()); | 38 EXPECT_EQ(2, animation->iterations()); |
39 EXPECT_EQ(2, animation->startTime()); | 39 EXPECT_EQ(2, animation->startTime()); |
40 EXPECT_EQ(2, animation->timeOffset()); | 40 EXPECT_EQ(2, animation->timeOffset()); |
41 EXPECT_TRUE(animation->alternatesDirection()); | 41 EXPECT_TRUE(animation->alternatesDirection()); |
42 } | 42 } |
43 | 43 |
44 } // namespace | 44 } // namespace |
45 } // namespace webkit | 45 } // namespace webkit |
OLD | NEW |