#include "content/browser/media/capture/mouse_cursor_overlay_controller.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_tick_clock.h"
#include "build/chromeos_buildflags.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/content_browser_test.h"
#include "content/shell/browser/shell.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features_generated.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/size_f.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ui/aura/client/cursor_shape_client.h"
#include "ui/wm/core/cursor_loader.h"
#endif
Mock;
namespace content {
namespace {
const base::TimeDelta kMinWaitInterval = …;
class MockOverlay final : public MouseCursorOverlayController::Overlay { … };
}
class MouseCursorOverlayControllerBrowserTest : public ContentBrowserTest { … };
IN_PROC_BROWSER_TEST_F(MouseCursorOverlayControllerBrowserTest,
PositionsOverlayOnMouseMoves) { … }
IN_PROC_BROWSER_TEST_F(MouseCursorOverlayControllerBrowserTest,
PositionsOverlayOnMouseClicks) { … }
IN_PROC_BROWSER_TEST_F(MouseCursorOverlayControllerBrowserTest,
CursorHidesWhenMouseStopsMoving) { … }
IN_PROC_BROWSER_TEST_F(MouseCursorOverlayControllerBrowserTest,
ForwardMouseEvents) { … }
IN_PROC_BROWSER_TEST_F(MouseCursorOverlayControllerBrowserTest,
MouseEventsNotFiredIfNotMoved) { … }
IN_PROC_BROWSER_TEST_F(MouseCursorOverlayControllerBrowserTest,
MouseEventsEnsureMinWaitInterval) { … }
class MouseCursorOverlayControllerNoMouseEventsBrowserTest
: public MouseCursorOverlayControllerBrowserTest { … };
IN_PROC_BROWSER_TEST_F(MouseCursorOverlayControllerNoMouseEventsBrowserTest,
DoNotForwardMouseEvents) { … }
}