chromium/content/browser/renderer_host/cursor_manager_unittest.cc

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

#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"

// CursorManager is only instantiated on Aura and Mac.
#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 {};

}  // namespace

// Verify basic CursorManager functionality when no OOPIFs are present.
TEST_F(CursorManagerTest, CursorOnSingleView) {}

// Verify cursor interactions between a parent frame and an out-of-process
// child frame.
TEST_F(CursorManagerTest, CursorOverChildView) {}

// Verify interactions between two independent OOPIFs, including interleaving
// cursor updates and mouse movements. This simulates potential race
// conditions between cursor updates.
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) {}

}  // namespace content

#endif  // defined(USE_AURA) || BUILDFLAG(IS_MAC)