| Index: cc/keyframed_animation_curve_unittest.cc
|
| diff --git a/cc/keyframed_animation_curve_unittest.cc b/cc/keyframed_animation_curve_unittest.cc
|
| index 0a0efdd5fcceece5673dca7ebf43fb0f447ebc69..b520dca4092cffaa7d1aa319c2a9b90fd884de2a 100644
|
| --- a/cc/keyframed_animation_curve_unittest.cc
|
| +++ b/cc/keyframed_animation_curve_unittest.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "cc/keyframed_animation_curve.h"
|
|
|
| +#include "cc/transform_operations.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "third_party/WebKit/Source/Platform/chromium/public/WebTransformOperations.h"
|
| @@ -87,8 +88,13 @@ TEST(KeyframedAnimationCurveTest, RepeatedFloatKeyTimes)
|
| TEST(KeyframedAnimationCurveTest, OneTransformKeyframe)
|
| {
|
| scoped_ptr<KeyframedTransformAnimationCurve> curve(KeyframedTransformAnimationCurve::create());
|
| +#if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL
|
| + TransformOperations operations;
|
| + operations.AppendTranslate(2, 0, 0);
|
| +#else
|
| WebKit::WebTransformOperations operations;
|
| operations.appendTranslate(2, 0, 0);
|
| +#endif
|
| curve->addKeyframe(TransformKeyframe::create(0, operations, scoped_ptr<TimingFunction>()));
|
|
|
| expectTranslateX(2, curve->getValue(-1));
|
| @@ -102,10 +108,17 @@ TEST(KeyframedAnimationCurveTest, OneTransformKeyframe)
|
| TEST(KeyframedAnimationCurveTest, TwoTransformKeyframe)
|
| {
|
| scoped_ptr<KeyframedTransformAnimationCurve> curve(KeyframedTransformAnimationCurve::create());
|
| +#if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL
|
| + TransformOperations operations1;
|
| + operations1.AppendTranslate(2, 0, 0);
|
| + TransformOperations operations2;
|
| + operations2.AppendTranslate(4, 0, 0);
|
| +#else
|
| WebKit::WebTransformOperations operations1;
|
| operations1.appendTranslate(2, 0, 0);
|
| WebKit::WebTransformOperations operations2;
|
| operations2.appendTranslate(4, 0, 0);
|
| +#endif
|
|
|
| curve->addKeyframe(TransformKeyframe::create(0, operations1, scoped_ptr<TimingFunction>()));
|
| curve->addKeyframe(TransformKeyframe::create(1, operations2, scoped_ptr<TimingFunction>()));
|
| @@ -120,12 +133,21 @@ TEST(KeyframedAnimationCurveTest, TwoTransformKeyframe)
|
| TEST(KeyframedAnimationCurveTest, ThreeTransformKeyframe)
|
| {
|
| scoped_ptr<KeyframedTransformAnimationCurve> curve(KeyframedTransformAnimationCurve::create());
|
| +#if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL
|
| + TransformOperations operations1;
|
| + operations1.AppendTranslate(2, 0, 0);
|
| + TransformOperations operations2;
|
| + operations2.AppendTranslate(4, 0, 0);
|
| + TransformOperations operations3;
|
| + operations3.AppendTranslate(8, 0, 0);
|
| +#else
|
| WebKit::WebTransformOperations operations1;
|
| operations1.appendTranslate(2, 0, 0);
|
| WebKit::WebTransformOperations operations2;
|
| operations2.appendTranslate(4, 0, 0);
|
| WebKit::WebTransformOperations operations3;
|
| operations3.appendTranslate(8, 0, 0);
|
| +#endif
|
| curve->addKeyframe(TransformKeyframe::create(0, operations1, scoped_ptr<TimingFunction>()));
|
| curve->addKeyframe(TransformKeyframe::create(1, operations2, scoped_ptr<TimingFunction>()));
|
| curve->addKeyframe(TransformKeyframe::create(2, operations3, scoped_ptr<TimingFunction>()));
|
| @@ -143,6 +165,16 @@ TEST(KeyframedAnimationCurveTest, RepeatedTransformKeyTimes)
|
| {
|
| scoped_ptr<KeyframedTransformAnimationCurve> curve(KeyframedTransformAnimationCurve::create());
|
| // A step function.
|
| +#if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL
|
| + TransformOperations operations1;
|
| + operations1.AppendTranslate(4, 0, 0);
|
| + TransformOperations operations2;
|
| + operations2.AppendTranslate(4, 0, 0);
|
| + TransformOperations operations3;
|
| + operations3.AppendTranslate(6, 0, 0);
|
| + TransformOperations operations4;
|
| + operations4.AppendTranslate(6, 0, 0);
|
| +#else
|
| WebKit::WebTransformOperations operations1;
|
| operations1.appendTranslate(4, 0, 0);
|
| WebKit::WebTransformOperations operations2;
|
| @@ -151,6 +183,7 @@ TEST(KeyframedAnimationCurveTest, RepeatedTransformKeyTimes)
|
| operations3.appendTranslate(6, 0, 0);
|
| WebKit::WebTransformOperations operations4;
|
| operations4.appendTranslate(6, 0, 0);
|
| +#endif
|
| curve->addKeyframe(TransformKeyframe::create(0, operations1, scoped_ptr<TimingFunction>()));
|
| curve->addKeyframe(TransformKeyframe::create(1, operations2, scoped_ptr<TimingFunction>()));
|
| curve->addKeyframe(TransformKeyframe::create(1, operations3, scoped_ptr<TimingFunction>()));
|
|
|