#include "third_party/blink/renderer/modules/animationworklet/worklet_animation.h"
#include <memory>
#include <optional>
#include <utility>
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_scroll_timeline_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_animationeffect_animationeffectsequence.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_documenttimeline_scrolltimeline.h"
#include "third_party/blink/renderer/core/animation/animation_clock.h"
#include "third_party/blink/renderer/core/animation/document_timeline.h"
#include "third_party/blink/renderer/core/animation/element_animations.h"
#include "third_party/blink/renderer/core/animation/keyframe_effect.h"
#include "third_party/blink/renderer/core/animation/keyframe_effect_model.h"
#include "third_party/blink/renderer/core/animation/scroll_timeline.h"
#include "third_party/blink/renderer/core/animation/worklet_animation_controller.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/execution_context/security_context.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
namespace blink {
namespace {
static constexpr double time_error_ms = …;
#define EXPECT_TIME_NEAR(expected, value) …
KeyframeEffectModelBase* CreateEffectModel() { … }
KeyframeEffect* CreateKeyframeEffect(Element* element) { … }
WorkletAnimation* CreateWorkletAnimation(
ScriptState* script_state,
Element* element,
const String& animator_name,
ScrollTimeline* scroll_timeline = nullptr) { … }
base::TimeDelta ToTimeDelta(double milliseconds) { … }
}
class WorkletAnimationTest : public RenderingTest { … };
TEST_F(WorkletAnimationTest, WorkletAnimationInElementAnimations) { … }
TEST_F(WorkletAnimationTest, ElementHasWorkletAnimation) { … }
TEST_F(WorkletAnimationTest, SetCurrentTimeInfNotCrash) { … }
TEST_F(WorkletAnimationTest, StyleHasCurrentAnimation) { … }
TEST_F(WorkletAnimationTest,
CurrentTimeFromDocumentTimelineIsOffsetByStartTime) { … }
TEST_F(WorkletAnimationTest,
DISABLED_CurrentTimeFromScrollTimelineNotOffsetByStartTime) { … }
TEST_F(WorkletAnimationTest, DocumentTimelineSetPlaybackRate) { … }
TEST_F(WorkletAnimationTest, DocumentTimelineSetPlaybackRateWhilePlaying) { … }
TEST_F(WorkletAnimationTest, PausePlay) { … }
TEST_F(WorkletAnimationTest, DISABLED_ScrollTimelineSetPlaybackRate) { … }
TEST_F(WorkletAnimationTest,
DISABLED_ScrollTimelineSetPlaybackRateWhilePlaying) { … }
TEST_F(WorkletAnimationTest, DISABLED_ScrollTimelineNewlyActive) { … }
TEST_F(WorkletAnimationTest, DISABLED_ScrollTimelineNewlyInactive) { … }
}