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);
}
 void expectDelayedAction(double when)
 {
     ::testing::Sequence sequence;
     EXPECT_CALL(*this, cancelWake()).InSequence(sequence);
     EXPECT_CALL(*this, wakeAfter(when)).InSequence(sequence);
 }