#include "chrome/browser/ui/fullscreen_keyboard_browsertest_base.h"
#include <memory>
#include <string>
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_list.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/tabs/tab_strip_model.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "third_party/blink/public/common/switches.h"
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "url/gurl.h"
#include "url/url_constants.h"
#if BUILDFLAG(IS_MAC)
#include "base/mac/mac_util.h"
#endif
namespace {
constexpr char kFullscreenKeyboardLockHTML[] = …;
void NormalizeMetaKeyForMacOS(std::string* output) { … }
}
FullscreenKeyboardBrowserTestBase::FullscreenKeyboardBrowserTestBase() =
default;
FullscreenKeyboardBrowserTestBase::~FullscreenKeyboardBrowserTestBase() =
default;
net::EmbeddedTestServer*
FullscreenKeyboardBrowserTestBase::GetEmbeddedTestServer() { … }
bool FullscreenKeyboardBrowserTestBase::IsActiveTabFullscreen() const { … }
bool FullscreenKeyboardBrowserTestBase::IsInBrowserFullscreen() const { … }
content::WebContents* FullscreenKeyboardBrowserTestBase::GetActiveWebContents()
const { … }
int FullscreenKeyboardBrowserTestBase::GetActiveTabIndex() const { … }
int FullscreenKeyboardBrowserTestBase::GetTabCount() const { … }
size_t FullscreenKeyboardBrowserTestBase::GetBrowserCount() const { … }
Browser* FullscreenKeyboardBrowserTestBase::GetActiveBrowser() const { … }
Browser* FullscreenKeyboardBrowserTestBase::CreateNewBrowserInstance() { … }
void FullscreenKeyboardBrowserTestBase::FocusOnLastActiveBrowser() { … }
void FullscreenKeyboardBrowserTestBase::WaitForBrowserCount(size_t expected) { … }
void FullscreenKeyboardBrowserTestBase::WaitForTabCount(int expected) { … }
void FullscreenKeyboardBrowserTestBase::WaitForActiveTabIndex(int expected) { … }
void FullscreenKeyboardBrowserTestBase::WaitForInactiveTabIndex(int expected) { … }
void FullscreenKeyboardBrowserTestBase::StartFullscreenLockPage() { … }
void FullscreenKeyboardBrowserTestBase::SendShortcut(ui::KeyboardCode key,
bool shift ) { … }
void FullscreenKeyboardBrowserTestBase::SendShiftShortcut(
ui::KeyboardCode key) { … }
void FullscreenKeyboardBrowserTestBase::SendFullscreenShortcutAndWait() { … }
void FullscreenKeyboardBrowserTestBase::SendJsFullscreenShortcutAndWait() { … }
void FullscreenKeyboardBrowserTestBase::SendEscape() { … }
void FullscreenKeyboardBrowserTestBase::
SendEscapeAndWaitForExitingFullscreen() { … }
void FullscreenKeyboardBrowserTestBase::SendShortcutsAndExpectPrevented() { … }
void FullscreenKeyboardBrowserTestBase::SendShortcutsAndExpectNotPrevented(
bool js_fullscreen) { … }
void FullscreenKeyboardBrowserTestBase::VerifyShortcutsAreNotPrevented() { … }
void FullscreenKeyboardBrowserTestBase::FinishTestAndVerifyResult() { … }
std::string FullscreenKeyboardBrowserTestBase::GetFullscreenFramePath() { … }
void FullscreenKeyboardBrowserTestBase::SetUpOnMainThread() { … }
void FullscreenKeyboardBrowserTestBase::SetUpCommandLine(
base::CommandLine* command_line) { … }