| Index: third_party/WebKit/Source/platform/animation/WebCompositorAnimationTest.cpp | 
| diff --git a/third_party/WebKit/Source/platform/animation/WebCompositorAnimationTest.cpp b/third_party/WebKit/Source/platform/animation/WebCompositorAnimationTest.cpp | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..8327ce706825a8b9c41b1aaa9ba0c5c54460630d | 
| --- /dev/null | 
| +++ b/third_party/WebKit/Source/platform/animation/WebCompositorAnimationTest.cpp | 
| @@ -0,0 +1,41 @@ | 
| +// Copyright 2014 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#include "platform/animation/WebCompositorAnimation.h" | 
| + | 
| +#include "platform/animation/WebFloatAnimationCurve.h" | 
| +#include "testing/gtest/include/gtest/gtest.h" | 
| + | 
| +namespace blink { | 
| + | 
| +TEST(WebCompositorAnimationTest, DefaultSettings) | 
| +{ | 
| +    scoped_ptr<WebCompositorAnimationCurve> curve(new WebFloatAnimationCurve()); | 
| +    scoped_ptr<WebCompositorAnimation> animation(new WebCompositorAnimation( | 
| +        *curve, WebCompositorAnimation::TargetPropertyOpacity, 1, 0)); | 
| + | 
| +    // Ensure that the defaults are correct. | 
| +    EXPECT_EQ(1, animation->iterations()); | 
| +    EXPECT_EQ(0, animation->startTime()); | 
| +    EXPECT_EQ(0, animation->timeOffset()); | 
| +    EXPECT_EQ(WebCompositorAnimation::DirectionNormal, animation->direction()); | 
| +} | 
| + | 
| +TEST(WebCompositorAnimationTest, ModifiedSettings) | 
| +{ | 
| +    scoped_ptr<WebFloatAnimationCurve> curve(new WebFloatAnimationCurve()); | 
| +    scoped_ptr<WebCompositorAnimation> animation(new WebCompositorAnimation( | 
| +        *curve, WebCompositorAnimation::TargetPropertyOpacity, 1, 0)); | 
| +    animation->setIterations(2); | 
| +    animation->setStartTime(2); | 
| +    animation->setTimeOffset(2); | 
| +    animation->setDirection(WebCompositorAnimation::DirectionReverse); | 
| + | 
| +    EXPECT_EQ(2, animation->iterations()); | 
| +    EXPECT_EQ(2, animation->startTime()); | 
| +    EXPECT_EQ(2, animation->timeOffset()); | 
| +    EXPECT_EQ(WebCompositorAnimation::DirectionReverse, animation->direction()); | 
| +} | 
| + | 
| +} // namespace blink | 
|  |