Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: Source/core/animation/ElementAnimationTest.cpp

Issue 149363002: Web Animations API: Implement step-middle and steps(x, middle) timing functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove class in BisonCSSParserTest and change to new license text Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/ElementAnimationTest.cpp
diff --git a/Source/core/animation/ElementAnimationTest.cpp b/Source/core/animation/ElementAnimationTest.cpp
index bede5224d693e9b1de19fe0e046230463919bc92..cd6a481cbbf19448a84f722d27c4fada23edb4e3 100644
--- a/Source/core/animation/ElementAnimationTest.cpp
+++ b/Source/core/animation/ElementAnimationTest.cpp
@@ -564,6 +564,10 @@ TEST_F(AnimationElementAnimationTest, TimingInputTimingFunction)
EXPECT_EQ(*(StepsTimingFunction::preset(StepsTimingFunction::Start)), *timing.timingFunction.get());
timing.timingFunction = defaultTimingFunction;
+ applyTimingInputString(timing, isolate, "easing", "step-middle");
+ EXPECT_EQ(*(StepsTimingFunction::preset(StepsTimingFunction::Middle)), *timing.timingFunction.get());
+ timing.timingFunction = defaultTimingFunction;
+
applyTimingInputString(timing, isolate, "easing", "step-end");
EXPECT_EQ(*(StepsTimingFunction::preset(StepsTimingFunction::End)), *timing.timingFunction.get());
timing.timingFunction = defaultTimingFunction;
@@ -573,19 +577,18 @@ TEST_F(AnimationElementAnimationTest, TimingInputTimingFunction)
timing.timingFunction = defaultTimingFunction;
applyTimingInputString(timing, isolate, "easing", "steps(3, start)");
- EXPECT_EQ(*(StepsTimingFunction::create(3, true).get()), *timing.timingFunction.get());
+ EXPECT_EQ(*(StepsTimingFunction::create(3, StepsTimingFunction::StepAtStart).get()), *timing.timingFunction.get());
timing.timingFunction = defaultTimingFunction;
- applyTimingInputString(timing, isolate, "easing", "steps(5, end)");
- EXPECT_EQ(*(StepsTimingFunction::create(5, false).get()), *timing.timingFunction.get());
+ applyTimingInputString(timing, isolate, "easing", "steps(5, middle)");
+ EXPECT_EQ(*(StepsTimingFunction::create(5, StepsTimingFunction::StepAtMiddle).get()), *timing.timingFunction.get());
timing.timingFunction = defaultTimingFunction;
- applyTimingInputString(timing, isolate, "easing", "steps(5.6, end)");
- EXPECT_EQ(*defaultTimingFunction.get(), *timing.timingFunction.get());
+ applyTimingInputString(timing, isolate, "easing", "steps(5, end)");
+ EXPECT_EQ(*(StepsTimingFunction::create(5, StepsTimingFunction::StepAtEnd).get()), *timing.timingFunction.get());
timing.timingFunction = defaultTimingFunction;
- // FIXME: Step-middle not yet implemented. Change this test when it is working.
- applyTimingInputString(timing, isolate, "easing", "steps(5, middle)");
+ applyTimingInputString(timing, isolate, "easing", "steps(5.6, end)");
EXPECT_EQ(*defaultTimingFunction.get(), *timing.timingFunction.get());
timing.timingFunction = defaultTimingFunction;

Powered by Google App Engine
This is Rietveld 408576698