#include "ui/views/animation/slide_out_controller.h"
#include <memory>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "ui/base/ui_base_features.h"
#include "ui/compositor/layer.h"
#include "ui/events/event.h"
#include "ui/events/test/event_generator.h"
#include "ui/events/types/event_type.h"
#include "ui/views/animation/slide_out_controller_delegate.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
namespace views {
namespace {
constexpr int kSwipeControlWidth = …;
constexpr int kTargetWidth = …;
}
class TestSlideOutControllerDelegate : public SlideOutControllerDelegate { … };
class SlideOutControllerTest : public ViewsTestBase { … };
TEST_F(SlideOutControllerTest, OnGestureEventAndDelegate) { … }
TEST_F(SlideOutControllerTest, SlideOutAndClose) { … }
TEST_F(SlideOutControllerTest, SlideLittleAmountAndNotClose) { … }
class SwipeControlTest
: public SlideOutControllerTest,
public testing::WithParamInterface<SlideOutController::SlideMode> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(SwipeControlTest, SetSwipeControlWidth_SwipeLessThanControlWidth) { … }
TEST_P(SwipeControlTest, SwipeControlWidth_SwipeMoreThanControlWidth) { … }
TEST_P(SwipeControlTest, SetSwipeControlWidth_SwipeOut) { … }
TEST_P(SwipeControlTest, SwipeControlWidth_SnapAndSwipeOut) { … }
TEST_P(SwipeControlTest, SwipeControlWidth_SnapAndSnapToControl) { … }
TEST_P(SwipeControlTest, SwipeControlWidth_SnapAndBackToOrigin) { … }
TEST_P(SwipeControlTest, SwipeControlWidth_NotSnapAndBackToOrigin) { … }
class TrackPadGestureTest : public SlideOutControllerTest { … };
TEST_F(TrackPadGestureTest, SlideOut) { … }
}