chromium/chrome/browser/ui/fullscreen_keyboard_browsertest_base.cc

// Copyright 2018 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/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 {

// The html file to receive key events, prevent defaults and export all the
// events with "getKeyEventReport()" function. It has two magic keys: pressing
// "S" to enter fullscreen mode; pressing "X" to indicate the end of all the
// keys (see FinishTestAndVerifyResult() function).
constexpr char kFullscreenKeyboardLockHTML[] =;

// On MacOSX command key is used for most of the shortcuts, so replace it with
// control to reduce the complexity of comparison of the results.
void NormalizeMetaKeyForMacOS(std::string* output) {}

}  // namespace

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 /* = false */) {}

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) {}