chromium/cc/animation/worklet_animation_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/animation/worklet_animation.h"

#include <memory>
#include <utility>
#include <vector>
#include "base/memory/ptr_util.h"
#include "base/time/time.h"
#include "cc/animation/animation_id_provider.h"
#include "cc/animation/keyframe_effect.h"
#include "cc/animation/scroll_timeline.h"
#include "cc/test/animation_test_common.h"
#include "cc/test/animation_timelines_test_common.h"
#include "cc/trees/property_tree.h"
#include "testing/gmock/include/gmock/gmock.h"

_;
Invoke;
Mock;
NiceMock;
Return;
Unused;

namespace cc {

namespace {

class MockKeyframeEffect : public KeyframeEffect {};

class WorkletAnimationTest : public AnimationTimelinesTest {};

class MockScrollTimeline : public ScrollTimeline {};

TEST_F(WorkletAnimationTest, NonImplInstanceDoesNotTickKeyframe) {}

TEST_F(WorkletAnimationTest, LocalTimeIsUsedWhenTicking) {}

// Test generation of animation events by worklet animations.
TEST_F(WorkletAnimationTest, AnimationEventLocalTimeUpdate) {}

TEST_F(WorkletAnimationTest, CurrentTimeCorrectlyUsesScrollTimeline) {}

TEST_F(WorkletAnimationTest,
       CurrentTimeFromRegularTimelineIsOffsetByStartTime) {}

// Verifies correctness of current time when playback rate is set on
// initializing the animation and while the animation is playing.
TEST_F(WorkletAnimationTest, DocumentTimelineSetPlaybackRate) {}

// Verifies correctness of current time when playback rate is set on
// initializing the scroll-linked animation and while the animation is playing.
TEST_F(WorkletAnimationTest, ScrollTimelineSetPlaybackRate) {}

// Verifies correcteness of worklet animation current time when inactive
// timeline becomes active and then inactive again.
TEST_F(WorkletAnimationTest, InactiveScrollTimeline) {}

// This test verifies that worklet animation state is properly updated.
TEST_F(WorkletAnimationTest, UpdateInputStateProducesCorrectState) {}

// This test verifies that worklet animation gets skipped properly.
TEST_F(WorkletAnimationTest, SkipUnchangedAnimations) {}

std::optional<base::TimeTicks> FakeIncreasingScrollTimelineTime(Unused,
                                                                Unused) {}

// This test verifies that worklet animation gets skipped properly if a pending
// mutation cycle is holding a lock on the worklet.
TEST_F(WorkletAnimationTest, SkipLockedAnimations) {}

}  // namespace

}  // namespace cc