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

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

Issue 369793003: Make the web-animations engine use the passed in blink::WebFrameTime values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing remaining usages of -1 in the code. Created 6 years, 5 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/AnimationTest.cpp ('k') | Source/core/animation/DocumentAnimations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationTimelineTest.cpp
diff --git a/Source/core/animation/AnimationTimelineTest.cpp b/Source/core/animation/AnimationTimelineTest.cpp
index 68cc2895a9b738474fdedc53d77dae28f298b7d4..5c4b2aec6734effd19f69cb2c39300e8c6b5e5f7 100644
--- a/Source/core/animation/AnimationTimelineTest.cpp
+++ b/Source/core/animation/AnimationTimelineTest.cpp
@@ -89,7 +89,8 @@ protected:
virtual void SetUp()
{
document = Document::create();
- document->animationClock().resetTimeForTesting();
+ document->animationClock().clearTimeForTesting();
+ document->animationClock().updateTime(AnimationClock::createTimeForTesting(0, 0));
element = Element::create(QualifiedName::null() , document.get());
platformTiming = new MockPlatformTiming;
timeline = AnimationTimeline::create(document.get(), adoptPtrWillBeNoop(platformTiming));
@@ -105,7 +106,7 @@ protected:
void updateClockAndService(double time)
{
- document->animationClock().updateTime(time);
+ document->animationClock().updateTime(AnimationClock::createTimeForTesting(time, time + 1));
timeline->serviceAnimations(TimingUpdateForAnimationFrame);
}
@@ -171,12 +172,12 @@ TEST_F(AnimationAnimationTimelineTest, ZeroTime)
timeline = AnimationTimeline::create(document.get());
bool isNull;
- document->animationClock().updateTime(100);
+ document->animationClock().updateTime(AnimationClock::createTimeForTesting(100, 101));
EXPECT_EQ(100, timeline->currentTimeInternal());
EXPECT_EQ(100, timeline->currentTimeInternal(isNull));
EXPECT_FALSE(isNull);
- document->animationClock().updateTime(200);
+ document->animationClock().updateTime(AnimationClock::createTimeForTesting(200, 201));
EXPECT_EQ(200, timeline->currentTimeInternal());
EXPECT_EQ(200, timeline->currentTimeInternal(isNull));
EXPECT_FALSE(isNull);
« no previous file with comments | « Source/core/animation/AnimationTest.cpp ('k') | Source/core/animation/DocumentAnimations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698