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

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

Issue 638313002: Web Animations: Overhaul and trace play state in AnimationPlayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Don't set compositor pending when paused for testing Created 6 years, 2 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
« no previous file with comments | « Source/core/animation/AnimationPlayer.cpp ('k') | Source/core/animation/AnimationStackTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationPlayerTest.cpp
diff --git a/Source/core/animation/AnimationPlayerTest.cpp b/Source/core/animation/AnimationPlayerTest.cpp
index 017f6d8b3d36ee1d25f2bb8cae7f12d362c96c25..cd37efde6878b4c60d1e35b3780239ef55d376e9 100644
--- a/Source/core/animation/AnimationPlayerTest.cpp
+++ b/Source/core/animation/AnimationPlayerTest.cpp
@@ -162,13 +162,13 @@ TEST_F(AnimationAnimationPlayerTest, SetCurrentTimeNegativeWithoutSimultaneousPl
simulateFrame(30);
EXPECT_EQ(20, player->currentTimeInternal());
EXPECT_EQ(AnimationPlayer::Running, player->playStateInternal());
- player->setCurrentTimeInternal(-10);
+ player->setCurrentTime(-10 * 1000);
EXPECT_EQ(AnimationPlayer::Finished, player->playStateInternal());
}
TEST_F(AnimationAnimationPlayerTest, SetCurrentTimePastContentEnd)
{
- player->setCurrentTimeInternal(50);
+ player->setCurrentTime(50 * 1000);
EXPECT_EQ(AnimationPlayer::Finished, player->playStateInternal());
EXPECT_EQ(50, player->currentTimeInternal());
simulateFrame(20);
@@ -176,7 +176,7 @@ TEST_F(AnimationAnimationPlayerTest, SetCurrentTimePastContentEnd)
EXPECT_EQ(50, player->currentTimeInternal());
player->setPlaybackRate(-2);
- player->setCurrentTimeInternal(50);
+ player->setCurrentTime(50 * 1000);
EXPECT_EQ(AnimationPlayer::Pending, player->playStateInternal());
EXPECT_EQ(50, player->currentTimeInternal());
simulateFrame(20);
@@ -240,14 +240,14 @@ TEST_F(AnimationAnimationPlayerTest, SetStartTime)
simulateFrame(20);
EXPECT_EQ(AnimationPlayer::Running, player->playStateInternal());
EXPECT_EQ(0, player->startTimeInternal());
- EXPECT_EQ(20, player->currentTimeInternal());
+ EXPECT_EQ(20 * 1000, player->currentTime());
player->setStartTime(10 * 1000);
EXPECT_EQ(AnimationPlayer::Running, player->playStateInternal());
EXPECT_EQ(10, player->startTimeInternal());
- EXPECT_EQ(10, player->currentTimeInternal());
+ EXPECT_EQ(10 * 1000, player->currentTime());
simulateFrame(30);
EXPECT_EQ(10, player->startTimeInternal());
- EXPECT_EQ(20, player->currentTimeInternal());
+ EXPECT_EQ(20 * 1000, player->currentTime());
player->setStartTime(-20 * 1000);
EXPECT_EQ(AnimationPlayer::Finished, player->playStateInternal());
}
« no previous file with comments | « Source/core/animation/AnimationPlayer.cpp ('k') | Source/core/animation/AnimationStackTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698