chromium/ui/views/animation/slide_out_controller_unittest.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 =;  // px
constexpr int kTargetWidth =;       // px
}  // namespace

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) {}

// Test class for making sure trackpad gestures work to trigger slide out
// events.
class TrackPadGestureTest : public SlideOutControllerTest {};

TEST_F(TrackPadGestureTest, SlideOut) {}

}  // namespace views