#include "third_party/blink/renderer/core/animation/css/css_animations.h"
#include "cc/animation/animation.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_cssnumericvalue_double.h"
#include "third_party/blink/renderer/core/animation/animation.h"
#include "third_party/blink/renderer/core/animation/animation_test_helpers.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/css/cssom/css_numeric_value.h"
#include "third_party/blink/renderer/core/dom/dom_token_list.h"
#include "third_party/blink/renderer/core/dom/node_computed_style.h"
#include "third_party/blink/renderer/core/dom/pseudo_element.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/platform/animation/compositor_animation.h"
#include "third_party/blink/renderer/platform/animation/compositor_animation_delegate.h"
#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
namespace {
const double kTolerance = …;
const double kTimeToleranceMilliseconds = …;
}
namespace blink {
class CSSAnimationsTest : public RenderingTest, public PaintTestConfigurations { … };
INSTANTIATE_PAINT_TEST_SUITE_P(…);
TEST_P(CSSAnimationsTest, RetargetedTransition) { … }
TEST_P(CSSAnimationsTest, IncompatibleRetargetedTransition) { … }
TEST_P(CSSAnimationsTest, CompositedBackgroundColorSnapshot) { … }
TEST_P(CSSAnimationsTest, AnimationFlags_Transitions) { … }
TEST_P(CSSAnimationsTest, AnimationFlags_Animations) { … }
namespace {
bool OpacityFlag(const ComputedStyle& style) { … }
bool TransformFlag(const ComputedStyle& style) { … }
bool ScaleFlag(const ComputedStyle& style) { … }
bool RotateFlag(const ComputedStyle& style) { … }
bool TranslateFlag(const ComputedStyle& style) { … }
bool FilterFlag(const ComputedStyle& style) { … }
bool BackdropFilterFlag(const ComputedStyle& style) { … }
bool BackgroundColorFlag(const ComputedStyle& style) { … }
bool CompositedOpacityFlag(const ComputedStyle& style) { … }
bool CompositedTransformFlag(const ComputedStyle& style) { … }
bool CompositedScaleFlag(const ComputedStyle& style) { … }
bool CompositedRotateFlag(const ComputedStyle& style) { … }
bool CompositedTranslateFlag(const ComputedStyle& style) { … }
bool CompositedFilterFlag(const ComputedStyle& style) { … }
bool CompositedBackdropFilterFlag(const ComputedStyle& style) { … }
FlagFunction;
struct FlagData { … };
FlagData flag_data[] = …;
FlagData compositor_flag_data[] = …;
String GenerateTransitionHTMLFrom(const FlagData& data) { … }
String GenerateCSSAnimationHTMLFrom(const FlagData& data) { … }
}
TEST_P(CSSAnimationsTest, AllAnimationFlags_Transitions) { … }
TEST_P(CSSAnimationsTest, AllAnimationFlags_Transitions_Compositor) { … }
TEST_P(CSSAnimationsTest, AllAnimationFlags_CSSAnimations) { … }
TEST_P(CSSAnimationsTest, AllAnimationFlags_CSSAnimations_Compositor) { … }
TEST_P(CSSAnimationsTest, AllAnimationFlags_JSAnimations) { … }
TEST_P(CSSAnimationsTest, AllAnimationFlags_JSAnimations_Compositor) { … }
TEST_P(CSSAnimationsTest, CompositedAnimationUpdateCausesPaintInvalidation) { … }
TEST_P(CSSAnimationsTest, UpdateAnimationFlags_AnimatingElement) { … }
TEST_P(CSSAnimationsTest, CSSTransitionBlockedByAnimationUseCounter) { … }
class CSSAnimationsCompositorSyncTest : public CSSAnimationsTest { … };
INSTANTIATE_PAINT_TEST_SUITE_P(…);
TEST_P(CSSAnimationsCompositorSyncTest, UpdatePlaybackRate) { … }
TEST_P(CSSAnimationsCompositorSyncTest, Reverse) { … }
TEST_P(CSSAnimationsCompositorSyncTest, SetStartTime) { … }
TEST_P(CSSAnimationsCompositorSyncTest, SetCurrentTime) { … }
TEST_P(CSSAnimationsTest, LingeringTimelineAttachments) { … }
TEST_P(CSSAnimationsTest, DeferredTimelineUpdate) { … }
TEST_P(CSSAnimationsTest, OpacityUnchangedWhileDeferred) { … }
}