chromium/chrome/browser/ui/views/autofill/popup/custom_cursor_suppressor_unittest.cc

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

#include "chrome/browser/ui/views/autofill/popup/custom_cursor_suppressor.h"

#include <memory>
#include <string_view>
#include <vector>

#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "content/public/browser/global_routing_id.h"
#include "content/public/browser/web_contents.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ui_base_types.h"
#include "url/gurl.h"

namespace {

GlobalRenderFrameHostId;
SizeIs;
UnorderedElementsAre;
UnorderedElementsAreArray;

constexpr std::string_view kUrl1 =;
constexpr std::string_view kUrl2 =;
constexpr std::string_view kUrl3 =;

}  // namespace

class CustomCursorSuppressorTest : public BrowserWithTestWindowTest {};

// Tests that custom cursor suppression works for a single browser window with a
// single tab.
TEST_F(CustomCursorSuppressorTest, SingleBrowserSingleTab) {}

// Tests that a navigation that results in a different `RenderFrameHost` for the
// still maintains a suppressed custom cursor.
TEST_F(CustomCursorSuppressorTest,
       SingleBrowserSingleTabWithNavigationToDifferentOrigin) {}

// Tests that custom cursor suppression reacts to active tab changes in a single
// browser window.
TEST_F(CustomCursorSuppressorTest, SingleBrowserWithTabChange) {}

// Tests that custom cursor suppression reacts to new foreground tabs that are
// added to a single browser window.
TEST_F(CustomCursorSuppressorTest, SingleBrowserWithForegroundTabAddition) {}

// Tests that custom cursor suppression does not react to a tab that is added to
// the background.
TEST_F(CustomCursorSuppressorTest, SingleBrowserWithBackgroundTabAddition) {}

// Tests that custom cursor suppression scopes are created for all active tabs
// in all active browser windows.
TEST_F(CustomCursorSuppressorTest, MultipleBrowsers) {}

// Tests that a new custom cursor suppression scope is created on browser window
// creation.
TEST_F(CustomCursorSuppressorTest, BrowserAddition) {}