| 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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "content/renderer/compositor_bindings/web_animation_impl.h" | 6 #include "cc/blink/web_animation_impl.h" |
| 7 #include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" | 7 #include "cc/blink/web_float_animation_curve_impl.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 using blink::WebCompositorAnimation; | 10 using blink::WebCompositorAnimation; |
| 11 using blink::WebCompositorAnimationCurve; | 11 using blink::WebCompositorAnimationCurve; |
| 12 using blink::WebFloatAnimationCurve; | 12 using blink::WebFloatAnimationCurve; |
| 13 | 13 |
| 14 namespace content { | 14 namespace cc_blink { |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 TEST(WebCompositorAnimationTest, DefaultSettings) { | 17 TEST(WebCompositorAnimationTest, DefaultSettings) { |
| 18 scoped_ptr<WebCompositorAnimationCurve> curve( | 18 scoped_ptr<WebCompositorAnimationCurve> curve( |
| 19 new WebFloatAnimationCurveImpl()); | 19 new WebFloatAnimationCurveImpl()); |
| 20 scoped_ptr<WebCompositorAnimation> animation(new WebCompositorAnimationImpl( | 20 scoped_ptr<WebCompositorAnimation> animation(new WebCompositorAnimationImpl( |
| 21 *curve, WebCompositorAnimation::TargetPropertyOpacity, 1, 0)); | 21 *curve, WebCompositorAnimation::TargetPropertyOpacity, 1, 0)); |
| 22 | 22 |
| 23 // Ensure that the defaults are correct. | 23 // Ensure that the defaults are correct. |
| 24 EXPECT_EQ(1, animation->iterations()); | 24 EXPECT_EQ(1, animation->iterations()); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 50 #if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION | 50 #if WEB_ANIMATION_SUPPORTS_FULL_DIRECTION |
| 51 EXPECT_EQ(WebCompositorAnimation::DirectionReverse, animation->direction()); | 51 EXPECT_EQ(WebCompositorAnimation::DirectionReverse, animation->direction()); |
| 52 #else | 52 #else |
| 53 EXPECT_TRUE(animation->alternatesDirection()); | 53 EXPECT_TRUE(animation->alternatesDirection()); |
| 54 animation->setAlternatesDirection(false); | 54 animation->setAlternatesDirection(false); |
| 55 EXPECT_FALSE(animation->alternatesDirection()); | 55 EXPECT_FALSE(animation->alternatesDirection()); |
| 56 #endif | 56 #endif |
| 57 } | 57 } |
| 58 | 58 |
| 59 } // namespace | 59 } // namespace |
| 60 } // namespace content | 60 } // namespace cc_blink |
| 61 | |
| OLD | NEW |