#include "ui/views/animation/animation_builder.h"
#include <memory>
#include <optional>
#include <utility>
#include "base/functional/bind.h"
#include "base/test/gtest_util.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
#include "ui/compositor/layer_owner.h"
#include "ui/compositor/property_change_reason.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/compositor/test/layer_animator_test_controller.h"
#include "ui/compositor/test/test_layer_animation_delegate.h"
#include "ui/gfx/geometry/rounded_corners_f.h"
#include "ui/gfx/geometry/transform.h"
#include "ui/gfx/interpolated_transform.h"
#include "ui/views/animation/animation_abort_handle.h"
namespace views {
namespace {
class TestAnimatibleLayerOwner : public ui::LayerOwner { … };
AnimationBuilder BuildLayerOpacityAnimationAndReturnBuilder(
ui::LayerOwner* layer_owner,
const base::TimeDelta& duration) { … }
}
class AnimationBuilderTest : public testing::Test { … };
TEST_F(AnimationBuilderTest, SimpleAnimation) { … }
TEST_F(AnimationBuilderTest, ModifiedSlowAnimationDuration) { … }
TEST_F(AnimationBuilderTest, ModifiedFastAnimationDuration) { … }
TEST_F(AnimationBuilderTest, ModifiedZeroAnimationDuration) { … }
TEST_F(AnimationBuilderTest, ModifiedZeroAnimationDurationWithOnEndedCallback) { … }
TEST_F(AnimationBuilderTest, ZeroDurationBlock) { … }
TEST_F(AnimationBuilderTest, CheckTweenType) { … }
TEST_F(AnimationBuilderTest, DestroyLayerBeforeAnimationEnd) { … }
TEST_F(AnimationBuilderTest, DestroyLayerWhenAnimationEnd) { … }
TEST_F(AnimationBuilderTest, DestroyLayerWhenAnimationAborted) { … }
TEST_F(AnimationBuilderTest, CheckStartEndCallbacks) { … }
TEST_F(AnimationBuilderTest, CheckOnWillRepeatCallbacks) { … }
TEST_F(AnimationBuilderTest, DelayedStart) { … }
TEST_F(AnimationBuilderTest, TwoKeyFrame) { … }
TEST_F(AnimationBuilderTest, PauseInTheMiddle) { … }
TEST_F(AnimationBuilderTest, TwoPropertiesOfDifferentDuration) { … }
TEST_F(AnimationBuilderTest, TwoPropertiesOfDifferentStartTime) { … }
TEST_F(AnimationBuilderTest, ThenAddsImplicitPause) { … }
TEST_F(AnimationBuilderTest, Repeat) { … }
TEST_F(AnimationBuilderTest, RepeatWithExplicitTrailingPause) { … }
TEST_F(AnimationBuilderTest, RepeatTwoProperties) { … }
TEST_F(AnimationBuilderTest, AtCanSkipThenBlock) { … }
TEST_F(AnimationBuilderTest, OffsetCanRewindTime) { … }
TEST_F(AnimationBuilderTest, RepeatedlyImplicitlyAppendsTrailingPause) { … }
TEST_F(AnimationBuilderTest, RepeatedBlocks) { … }
TEST_F(AnimationBuilderTest, PreemptionStrategyTest) { … }
TEST_F(AnimationBuilderTest, AbortHandle) { … }
TEST_F(AnimationBuilderTest, BuildAnimationWithBuilderFromScope) { … }
TEST_F(AnimationBuilderTest,
DisallowMultipleSameBlockSameTargetTransformPropertyAnimations) { … }
TEST_F(AnimationBuilderTest, SetInterpolatedTransform) { … }
}