#include <memory>
#include <optional>
#include <utility>
#include "base/containers/flat_set.h"
#include "base/functional/callback.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
#include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/fullscreen_control/fullscreen_control_host.h"
#include "chrome/common/chrome_features.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/fullscreen_control/fullscreen_control_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/base_event_utils.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/dom/dom_code.h"
#include "ui/gfx/animation/animation_test_api.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/test/button_test_api.h"
#include "ui/views/view.h"
#include "url/gurl.h"
#if defined(USE_AURA)
#include "ui/aura/test/test_cursor_client.h"
#include "ui/aura/window.h"
#endif
namespace {
constexpr base::TimeDelta kPopupEventTimeout = …;
}
class FullscreenControlViewTest : public InProcessBrowserTest { … };
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_NoFullscreenPopupOnBrowserFullscreen …
#else
#define MAYBE_NoFullscreenPopupOnBrowserFullscreen …
#endif
IN_PROC_BROWSER_TEST_F(FullscreenControlViewTest,
MAYBE_NoFullscreenPopupOnBrowserFullscreen) { … }
#if !BUILDFLAG(IS_MAC)
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_MouseExitFullscreen …
#else
#define MAYBE_MouseExitFullscreen …
#endif
IN_PROC_BROWSER_TEST_F(FullscreenControlViewTest, MAYBE_MouseExitFullscreen) { … }
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_MouseExitFullscreen_TimeoutAndRetrigger …
#else
#define MAYBE_MouseExitFullscreen_TimeoutAndRetrigger …
#endif
IN_PROC_BROWSER_TEST_F(FullscreenControlViewTest,
MAYBE_MouseExitFullscreen_TimeoutAndRetrigger) { … }
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_MouseOnTopWhenPromptIsShowing_ButtonNotShownUntilMouseLeavesBufferArea …
#else
#define MAYBE_MouseOnTopWhenPromptIsShowing_ButtonNotShownUntilMouseLeavesBufferArea …
#endif
IN_PROC_BROWSER_TEST_F(
FullscreenControlViewTest,
MAYBE_MouseOnTopWhenPromptIsShowing_ButtonNotShownUntilMouseLeavesBufferArea) { … }
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_TouchPopupInteraction …
#else
#define MAYBE_TouchPopupInteraction …
#endif
IN_PROC_BROWSER_TEST_F(FullscreenControlViewTest, MAYBE_TouchPopupInteraction) { … }
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_MouseAndTouchInteraction_NoInterference …
#else
#define MAYBE_MouseAndTouchInteraction_NoInterference …
#endif
IN_PROC_BROWSER_TEST_F(FullscreenControlViewTest,
MAYBE_MouseAndTouchInteraction_NoInterference) { … }
#endif
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_KeyboardPopupInteraction …
#else
#define MAYBE_KeyboardPopupInteraction …
#endif
IN_PROC_BROWSER_TEST_F(FullscreenControlViewTest,
MAYBE_KeyboardPopupInteraction) { … }