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

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

Issue 172003002: Web Animations: Don't mark players as outdated upon currentTime access (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@currentplayers
Patch Set: add test Created 6 years, 9 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/Player.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/PlayerTest.cpp
diff --git a/Source/core/animation/PlayerTest.cpp b/Source/core/animation/PlayerTest.cpp
index 7034a8cbccb87a43abcd2ee893d0ea93f0c10bae..d9546787174b5bf5dda0f2168d94fb5388df3d08 100644
--- a/Source/core/animation/PlayerTest.cpp
+++ b/Source/core/animation/PlayerTest.cpp
@@ -113,6 +113,19 @@ TEST_F(AnimationPlayerTest, InitialState)
}
+TEST_F(AnimationPlayerTest, CurrentTimeDoesNotSetOutdated)
+{
+ EXPECT_FALSE(player->outdated());
+ EXPECT_EQ(0, player->currentTime());
+ EXPECT_FALSE(player->outdated());
+ // FIXME: We should split updateTimeline into a version that doesn't update
+ // the player and one that does, as most of the tests don't require update()
+ // to be called.
+ document->animationClock().updateTime(10);
+ EXPECT_EQ(10, player->currentTime());
+ EXPECT_FALSE(player->outdated());
+}
+
TEST_F(AnimationPlayerTest, SetCurrentTime)
{
player->setCurrentTime(10);
« no previous file with comments | « Source/core/animation/Player.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698