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

Unified Diff: Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp

Issue 10384167: Merge 116554 - [chromium] Add impl-thread support for fill-mode and direction css animation propert… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 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/WebKit/chromium/tests/CCActiveAnimationTest.cpp
===================================================================
--- Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp (revision 116999)
+++ Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp (working copy)
@@ -69,6 +69,16 @@
EXPECT_EQ(0.5, anim->trimTimeToCurrentIteration(1.5));
}
+TEST(CCActiveAnimationTest, TrimTimeAlternating)
+{
+ OwnPtr<CCActiveAnimation> anim(createActiveAnimation(-1));
+ anim->setAlternatesDirection(true);
+ EXPECT_EQ(0, anim->trimTimeToCurrentIteration(0));
+ EXPECT_EQ(0.5, anim->trimTimeToCurrentIteration(0.5));
+ EXPECT_EQ(1, anim->trimTimeToCurrentIteration(1));
+ EXPECT_EQ(0.75, anim->trimTimeToCurrentIteration(1.25));
+}
+
TEST(CCActiveAnimationTest, TrimTimeStartTime)
{
OwnPtr<CCActiveAnimation> anim(createActiveAnimation(1));

Powered by Google App Engine
This is Rietveld 408576698