#include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
#include "base/functional/bind.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_test.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/input/native_web_keyboard_event.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/browser_test.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/keyboard_codes.h"
WebContents;
PAGE_TRANSITION_TYPED;
FullscreenControllerTest;
namespace {
void WaitForDisplayed(Browser* browser) { … }
}
#if BUILDFLAG(IS_MAC)
#define MAYBE_FullscreenOnFileURL …
#else
#define MAYBE_FullscreenOnFileURL …
#endif
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, MAYBE_FullscreenOnFileURL) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, KeyboardLockWithEscLocked) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, KeyboardLockWithEscUnlocked) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockOnFileURLWithEscLocked) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockOnFileURLWithEscUnlocked) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockNotLockedInWindowMode) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockExitsOnEscPressWhenEscNotLocked) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockDoesNotExitOnEscPressWhenEscIsLocked) { … }
#if BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_KeyboardLockNotLockedInExtensionFullscreenMode …
#else
#define MAYBE_KeyboardLockNotLockedInExtensionFullscreenMode …
#endif
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
MAYBE_KeyboardLockNotLockedInExtensionFullscreenMode) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockNotLockedAfterFullscreenTransition) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockBubbleHideCallbackUnlock) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, FastKeyboardLockUnlockRelock) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, SlowKeyboardLockUnlockRelock) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
RepeatedEscEventsWithinWindowReshowsExitBubble) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
RepeatedEscEventsOutsideWindowDoesNotShowExitBubble) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, KeyboardLockAfterPointerLock) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockAfterPointerLockWithEscLocked) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
KeyboardLockCycleWithMixedEscLockStates) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest, DISABLED_TopViewStatusChange) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerTest,
EnterFullscreenWhenInFullscreen) { … }
class FullscreenControllerPressAndHoldEscTest
: public FullscreenControllerTest { … };
IN_PROC_BROWSER_TEST_F(FullscreenControllerPressAndHoldEscTest,
ExitBrowserFullscreenOnPressAndHoldEsc) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerPressAndHoldEscTest,
ExitBrowserFullscreenOnMultipleEscKeyDown) { … }
IN_PROC_BROWSER_TEST_F(FullscreenControllerPressAndHoldEscTest,
ExitBrowserAndTabFullscreenOnPressAndHoldEsc) { … }
IN_PROC_BROWSER_TEST_F(
FullscreenControllerPressAndHoldEscTest,
ExitBrowserFullscreenAndUnlockKeyboardOnPressAndHoldEsc) { … }