TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart) { timing.iterationDuration = 2; timing.startDelay = 5; KeyframeEffect* keyframeEffect = KeyframeEffect::create(element.get(), nullptr, timing); timeline->play(keyframeEffect); // TODO: Put the animation startTime in the future when we add the capability to change animation startTime EXPECT_CALL(*platformTiming, wakeAfter(timing.startDelay - minimumDelay())); updateClockAndService(0); EXPECT_CALL(*platformTiming, wakeAfter(timing.startDelay - minimumDelay() - 1.5)); updateClockAndService(1.5); EXPECT_CALL(*platformTiming, serviceOnNextFrame()); wake(); EXPECT_CALL(*platformTiming, serviceOnNextFrame()); updateClockAndService(4.98); }
TEST_F(AnimationAnimationTimelineTest, DelayBeforeAnimationStart) { timing.iterationDuration = 2; timing.startDelay = 5; RefPtrWillBeRawPtr<Animation> anim = Animation::create(element.get(), nullptr, timing); timeline->play(anim.get()); // TODO: Put the player startTime in the future when we add the capability to change player startTime platformTiming->expectDelayedAction(timing.startDelay - minimumDelay()); updateClockAndService(0); platformTiming->expectDelayedAction(timing.startDelay - minimumDelay() - 1.5); updateClockAndService(1.5); EXPECT_CALL(*platformTiming, serviceOnNextFrame()); wake(); platformTiming->expectNextFrameAction(); updateClockAndService(4.98); }