#include "ui/views/animation/bubble_slide_animator.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/test/bind.h"
#include "base/time/time.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/animation/animation_test_api.h"
#include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/flex_layout_view.h"
#include "ui/views/test/widget_test.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
namespace views {
namespace {
constexpr base::TimeDelta kSlideDuration = …;
constexpr base::TimeDelta kHalfSlideDuration = …;
constexpr gfx::Size kTestViewSize(100, 100);
constexpr gfx::Rect kAnchorWidgetRect(50, 50, 400, 250);
class TestBubbleView : public BubbleDialogDelegateView { … };
class TestBubbleSlideAnimator : public BubbleSlideAnimator { … };
}
class BubbleSlideAnimatorTest : public test::WidgetTest { … };
TEST_F(BubbleSlideAnimatorTest, InitiateSlide) { … }
TEST_F(BubbleSlideAnimatorTest, SlideProgresses) { … }
TEST_F(BubbleSlideAnimatorTest, SnapToAnchorView) { … }
TEST_F(BubbleSlideAnimatorTest, SlideCallbacksCalled) { … }
TEST_F(BubbleSlideAnimatorTest, SnapCallbacksCalled) { … }
TEST_F(BubbleSlideAnimatorTest, InterruptingWithSlideCallsCorrectCallbacks) { … }
TEST_F(BubbleSlideAnimatorTest, InterruptingWithSnapCallsCorrectCallbacks) { … }
TEST_F(BubbleSlideAnimatorTest, CancelAnimation) { … }
TEST_F(BubbleSlideAnimatorTest, MultipleSlidesInSequence) { … }
TEST_F(BubbleSlideAnimatorTest, SlideBackToStartingPosition) { … }
TEST_F(BubbleSlideAnimatorTest, InterruptingSlide) { … }
TEST_F(BubbleSlideAnimatorTest, WidgetClosedDuringSlide) { … }
TEST_F(BubbleSlideAnimatorTest, AnimatorDestroyedDuringSlide) { … }
TEST_F(BubbleSlideAnimatorTest, AnimationSetsAnchorView) { … }
TEST_F(BubbleSlideAnimatorTest, SnapSetsAnchorView) { … }
TEST_F(BubbleSlideAnimatorTest, CancelDoesntSetAnchorView) { … }
}