From 1b914638db989aaa98631a1c1e02c7b2d44805d8 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 11 May 2012 09:43:24 +0200 Subject: Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736) New snapshot to include QDeclarative* -> QQml* build fixes --- Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp') diff --git a/Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp b/Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp index a1ab770b7..af9fde1d5 100644 --- a/Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp +++ b/Source/WebKit/chromium/tests/CCActiveAnimationTest.cpp @@ -69,6 +69,16 @@ TEST(CCActiveAnimationTest, TrimTimeInfiniteIterations) EXPECT_EQ(0.5, anim->trimTimeToCurrentIteration(1.5)); } +TEST(CCActiveAnimationTest, TrimTimeAlternating) +{ + OwnPtr 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 anim(createActiveAnimation(1)); -- cgit v1.2.1