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

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

Issue 215043007: Web Animations: Expose timeline currentTime in IDL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: isNull not isNullTime 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/DocumentTimeline.cpp ('k') | Source/core/animation/Timeline.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/DocumentTimelineTest.cpp
diff --git a/Source/core/animation/DocumentTimelineTest.cpp b/Source/core/animation/DocumentTimelineTest.cpp
index 8be0696c8a4a9a4effeab5ccc3dd2b62477a5a05..2710ce293b6df891b0a9b027bb44aa55a4e410a6 100644
--- a/Source/core/animation/DocumentTimelineTest.cpp
+++ b/Source/core/animation/DocumentTimelineTest.cpp
@@ -169,16 +169,21 @@ TEST_F(AnimationDocumentTimelineTest, EmptyForwardsKeyframeAnimation)
TEST_F(AnimationDocumentTimelineTest, ZeroTime)
{
timeline = DocumentTimeline::create(document.get());
+ bool isNull;
document->animationClock().updateTime(100);
- EXPECT_TRUE(isNull(timeline->currentTime()));
+ EXPECT_TRUE(std::isnan(timeline->currentTime()));
+ EXPECT_TRUE(std::isnan(timeline->currentTime(isNull)));
+ EXPECT_TRUE(isNull);
document->animationClock().updateTime(200);
- EXPECT_TRUE(isNull(timeline->currentTime()));
+ EXPECT_TRUE(std::isnan(timeline->currentTime()));
timeline->setZeroTime(300);
document->animationClock().updateTime(300);
EXPECT_EQ(0, timeline->currentTime());
+ EXPECT_EQ(0, timeline->currentTime(isNull));
+ EXPECT_FALSE(isNull);
document->animationClock().updateTime(400);
EXPECT_EQ(100, timeline->currentTime());
« no previous file with comments | « Source/core/animation/DocumentTimeline.cpp ('k') | Source/core/animation/Timeline.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698