#include "cc/animation/element_animations.h"
#include <limits>
#include <memory>
#include <utility>
#include "base/memory/ptr_util.h"
#include "cc/animation/animation.h"
#include "cc/animation/animation_delegate.h"
#include "cc/animation/animation_events.h"
#include "cc/animation/animation_host.h"
#include "cc/animation/animation_id_provider.h"
#include "cc/animation/animation_timeline.h"
#include "cc/animation/keyframe_effect.h"
#include "cc/animation/scroll_offset_animation_curve.h"
#include "cc/animation/scroll_offset_animation_curve_factory.h"
#include "cc/test/animation_test_common.h"
#include "cc/test/animation_timelines_test_common.h"
#include "ui/gfx/animation/keyframe/keyframed_animation_curve.h"
#include "ui/gfx/geometry/box_f.h"
#include "ui/gfx/geometry/test/geometry_util.h"
#include "ui/gfx/geometry/transform_operations.h"
namespace cc {
namespace {
TimeTicks;
static base::TimeTicks TicksFromSecondsF(double seconds) { … }
const TimeTicks kInitialTickTime = …;
class ElementAnimationsTest : public AnimationTimelinesTest { … };
TEST_F(ElementAnimationsTest, AttachToLayerInActiveTree) { … }
TEST_F(ElementAnimationsTest, AddRemoveAnimations) { … }
TEST_F(ElementAnimationsTest, SyncNewAnimation) { … }
TEST_F(ElementAnimationsTest,
SyncScrollOffsetAnimationRespectsHasSetInitialValue) { … }
class TestAnimationDelegateThatDestroysAnimation
: public TestAnimationDelegate { … };
TEST_F(ElementAnimationsTest, AddedAnimationIsDestroyed) { … }
TEST_F(ElementAnimationsTest, DoNotClobberStartTimes) { … }
TEST_F(ElementAnimationsTest, UseSpecifiedStartTimes) { … }
TEST_F(ElementAnimationsTest, Activation) { … }
TEST_F(ElementAnimationsTest, SyncPause) { … }
TEST_F(ElementAnimationsTest, DoNotSyncFinishedAnimation) { … }
TEST_F(ElementAnimationsTest, AnimationsAreDeleted) { … }
TEST_F(ElementAnimationsTest, AnimationFinishedOnImplDeletedOnMain) { … }
static std::unique_ptr<KeyframeModel> CreateKeyframeModel(
std::unique_ptr<gfx::AnimationCurve> curve,
int group_id,
TargetProperty::Type property) { … }
TEST_F(ElementAnimationsTest, TrivialTransition) { … }
TEST_F(ElementAnimationsTest, FilterTransition) { … }
TEST_F(ElementAnimationsTest, BackdropFilterTransition) { … }
TEST_F(ElementAnimationsTest, ScrollOffsetTransition) { … }
TEST_F(ElementAnimationsTest, ScrollOffsetTransitionOnImplOnly) { … }
TEST_F(ElementAnimationsTest, UpdateStateWithoutAnimate) { … }
TEST_F(ElementAnimationsTest, ScrollOffsetTransitionNoImplProvider) { … }
TEST_F(ElementAnimationsTest, ScrollOffsetRemovalClearsScrollDelta) { … }
TEST_F(ElementAnimationsTest,
NotificationsForImplOnlyAnimationsAreSentToImplThreadDelegate) { … }
TEST_F(ElementAnimationsTest, SpecifiedStartTimesAreSentToMainThreadDelegate) { … }
TEST_F(ElementAnimationsTest,
AnimationsWaitingForStartTimeDoNotFinishIfTheyOutwaitTheirFinish) { … }
TEST_F(ElementAnimationsTest, TrivialQueuing) { … }
TEST_F(ElementAnimationsTest, Interrupt) { … }
TEST_F(ElementAnimationsTest, ScheduleTogetherWhenAPropertyIsBlocked) { … }
TEST_F(ElementAnimationsTest, ScheduleTogetherWithAnAnimWaiting) { … }
TEST_F(ElementAnimationsTest, TrivialLooping) { … }
TEST_F(ElementAnimationsTest, InfiniteLooping) { … }
TEST_F(ElementAnimationsTest, PauseResume) { … }
TEST_F(ElementAnimationsTest, AbortAGroupedAnimation) { … }
TEST_F(ElementAnimationsTest, PushUpdatesWhenSynchronizedStartTimeNeeded) { … }
TEST_F(ElementAnimationsTest, SkipUpdateState) { … }
TEST_F(ElementAnimationsTest, InactiveObserverGetsTicked) { … }
TEST_F(ElementAnimationsTest, AbortKeyframeModelsWithProperty) { … }
TEST_F(ElementAnimationsTest, MainThreadAbortedAnimationGetsDeleted) { … }
TEST_F(ElementAnimationsTest, ImplThreadAbortedAnimationGetsDeleted) { … }
TEST_F(ElementAnimationsTest, ImplThreadTakeoverAnimationGetsDeleted) { … }
TEST_F(ElementAnimationsTest, FinishedEventsForGroup) { … }
TEST_F(ElementAnimationsTest, FinishedAndAbortedEventsForGroup) { … }
TEST_F(ElementAnimationsTest, MaximumAnimationScaleNotScaled) { … }
TEST_F(ElementAnimationsTest, MaximumAnimationNonCalculatableScale) { … }
TEST_F(ElementAnimationsTest, MaximumAnimationPartialNonCalculatableScale) { … }
TEST_F(ElementAnimationsTest, MaximumScale) { … }
TEST_F(ElementAnimationsTest, MaximumAnimationScaleWithDirection) { … }
TEST_F(ElementAnimationsTest, NewlyPushedAnimationWaitsForActivation) { … }
TEST_F(ElementAnimationsTest, ActivationBetweenAnimateAndUpdateState) { … }
TEST_F(ElementAnimationsTest, ObserverNotifiedWhenTransformAnimationChanges) { … }
TEST_F(ElementAnimationsTest, ObserverNotifiedWhenOpacityAnimationChanges) { … }
TEST_F(ElementAnimationsTest, ObserverNotifiedWhenFilterAnimationChanges) { … }
TEST_F(ElementAnimationsTest,
ObserverNotifiedWhenBackdropFilterAnimationChanges) { … }
TEST_F(ElementAnimationsTest, ClippedOpacityValues) { … }
TEST_F(ElementAnimationsTest, ClippedNegativeOpacityValues) { … }
TEST_F(ElementAnimationsTest, PushedDeletedAnimationWaitsForActivation) { … }
TEST_F(ElementAnimationsTest, StartAnimationsAffectingDifferentObservers) { … }
TEST_F(ElementAnimationsTest, TestIsCurrentlyAnimatingProperty) { … }
TEST_F(ElementAnimationsTest, TestIsAnimatingPropertyTimeOffsetFillMode) { … }
TEST_F(ElementAnimationsTest, RemoveAndReAddAnimationToTicking) { … }
TEST_F(ElementAnimationsTest, FinishedKeyframeModelsNotCopiedToImpl) { … }
TEST_F(ElementAnimationsTest, ClientAnimationState) { … }
}
}