| 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 0e6fbbfa70eba489a6be885355ae7770eb399f88..c5aed82207c0f939ea1c03bf3fdabab8130fe597 100644
|
| --- a/cc/animation/keyframed_animation_curve_unittest.cc
|
| +++ b/cc/animation/keyframed_animation_curve_unittest.cc
|
| @@ -427,6 +427,25 @@ 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(0.25f, curve->GetValue(0.25));
|
| + EXPECT_FLOAT_EQ(0.5f, curve->GetValue(0.5f));
|
| + EXPECT_FLOAT_EQ(0.75f, curve->GetValue(0.75));
|
| + EXPECT_FLOAT_EQ(1.f, curve->GetValue(1.f));
|
| +}
|
| +
|
| // Tests that animated bounds are computed as expected.
|
| TEST(KeyframedAnimationCurveTest, AnimatedBounds) {
|
| scoped_ptr<KeyframedTransformAnimationCurve> curve(
|
|
|