#include "components/input/cursor_manager.h"
#include <memory>
#include <utility>
#include "build/build_config.h"
#include "content/browser/renderer_host/mock_render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/site_instance_group.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_browser_context.h"
#include "content/test/mock_render_widget_host_delegate.h"
#include "content/test/test_render_view_host.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
#include "ui/gfx/geometry/point.h"
#if defined(USE_AURA) || BUILDFLAG(IS_MAC)
namespace content {
namespace {
const ui::Cursor kCursorHand(ui::mojom::CursorType::kHand);
const ui::Cursor kCursorCross(ui::mojom::CursorType::kCross);
const ui::Cursor kCursorPointer(ui::mojom::CursorType::kPointer);
ui::Cursor CreateCustomCursor(int width, int height) { … }
const ui::Cursor kCursorCustom = …;
class MockRenderWidgetHostViewForCursors : public TestRenderWidgetHostView { … };
class CursorManagerTest : public testing::Test { … };
}
TEST_F(CursorManagerTest, CursorOnSingleView) { … }
TEST_F(CursorManagerTest, CursorOverChildView) { … }
TEST_F(CursorManagerTest, CursorOverMultipleChildViews) { … }
TEST_F(CursorManagerTest,
CustomCursorDisallowedScope_CustomCursorsAreNotAllowed) { … }
TEST_F(CursorManagerTest,
CustomCursorDisallowedScope_CustomCursorsAreNotAllowedAboveSizeLimit) { … }
TEST_F(CursorManagerTest,
CustomCursorDisallowedScope_CustomCursorsAreAllowedBelowSizeLimit) { … }
TEST_F(CursorManagerTest,
CustomCursorDisallowedScope_CustomCursorSubjectToMultipleSizeLimits) { … }
TEST_F(CursorManagerTest,
CustomCursorDisallowedScope_OtherCursorsStillAllowed) { … }
TEST_F(CursorManagerTest,
CustomCursorDisallowedScope_CustomCursorSetDuringScope) { … }
TEST_F(CursorManagerTest,
CustomCursorDisallowedScope_CustomCursorRemovedDuringScope) { … }
TEST_F(CursorManagerTest, CustomCursorDisallowedScope_MultipleScopes) { … }
TEST_F(CursorManagerTest, CustomCursorDisallowedScope_CustomCursorViewFocused) { … }
TEST_F(CursorManagerTest,
CustomCursorDisallowedScope_CustomCursorViewFocusRemoved) { … }
}
#endif