#include "ui/views/controls/resize_area.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/events/test/event_generator.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/resize_area_delegate.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_utils.h"
#if !BUILDFLAG(IS_MAC)
#include "ui/aura/window.h"
#endif
namespace {
const int kGestureScrollDistance = …;
const int kGestureScrollSteps = …;
const int kDistancePerGestureScrollUpdate = …;
}
namespace views {
class TestResizeAreaDelegate : public ResizeAreaDelegate { … };
TestResizeAreaDelegate::TestResizeAreaDelegate() = default;
TestResizeAreaDelegate::~TestResizeAreaDelegate() = default;
void TestResizeAreaDelegate::OnResize(int resize_amount, bool done_resizing) { … }
class ResizeAreaTest : public ViewsTestBase { … };
ResizeAreaTest::ResizeAreaTest() = default;
ResizeAreaTest::~ResizeAreaTest() = default;
void ResizeAreaTest::ProcessGesture(ui::EventType type,
const gfx::Vector2dF& delta) { … }
void ResizeAreaTest::SetUp() { … }
void ResizeAreaTest::TearDown() { … }
#if !BUILDFLAG(IS_MAC)
TEST_F(ResizeAreaTest, SuccessfulMouseDrag) { … }
TEST_F(ResizeAreaTest, FailedMouseDrag) { … }
TEST_F(ResizeAreaTest, SuccessfulGestureDrag) { … }
TEST_F(ResizeAreaTest, NoDragOnGestureTap) { … }
TEST_F(ResizeAreaTest, AccessibleRole) { … }
#endif
}