| Index: cc/animation/keyframed_animation_curve_unittest.cc
|
| diff --git a/cc/animation/keyframed_animation_curve_unittest.cc b/cc/animation/keyframed_animation_curve_unittest.cc
|
| index eceba6fc9e550b3278c6ba7d3fbc871011272de2..572346af06d8ee012589bc46b6e78e98eadd3acd 100644
|
| --- a/cc/animation/keyframed_animation_curve_unittest.cc
|
| +++ b/cc/animation/keyframed_animation_curve_unittest.cc
|
| @@ -427,6 +427,28 @@ TEST(KeyframedAnimationCurveTest, CubicBezierTimingFunction) {
|
| EXPECT_FLOAT_EQ(1.f, curve->GetValue(1.f));
|
| }
|
|
|
| +// Tests that a steps timing function works as expected.
|
| +TEST(KeyframedAnimationCurveTest, StepsTimingFunction) {
|
| + scoped_ptr<KeyframedFloatAnimationCurve> curve(
|
| + KeyframedFloatAnimationCurve::Create());
|
| + curve->AddKeyframe(FloatKeyframe::Create(
|
| + 0.0,
|
| + 0.f,
|
| + StepsTimingFunction::Create(36, false).PassAs<TimingFunction>()));
|
| + curve->AddKeyframe(
|
| + FloatKeyframe::Create(1.0, 1.f, scoped_ptr<TimingFunction>()));
|
| +
|
| + EXPECT_FLOAT_EQ(0.f, curve->GetValue(0.f));
|
| + EXPECT_FLOAT_EQ(7.0 / 36.0, curve->GetValue(0.20f));
|
| + EXPECT_FLOAT_EQ(0.25f, curve->GetValue(0.25f));
|
| + EXPECT_FLOAT_EQ(10.0 / 36.0, curve->GetValue(0.30f));
|
| + EXPECT_FLOAT_EQ(0.5f, curve->GetValue(0.5f));
|
| + EXPECT_FLOAT_EQ(21.0 / 36.0, curve->GetValue(0.60f));
|
| + EXPECT_FLOAT_EQ(0.75f, curve->GetValue(0.75f));
|
| + EXPECT_FLOAT_EQ(32.0 / 36.0, curve->GetValue(0.90f));
|
| + EXPECT_FLOAT_EQ(1.f, curve->GetValue(1.f));
|
| +}
|
| +
|
| // Tests that animated bounds are computed as expected.
|
| TEST(KeyframedAnimationCurveTest, AnimatedBounds) {
|
| scoped_ptr<KeyframedTransformAnimationCurve> curve(
|
|
|