#include "chrome/browser/apps/platform_apps/app_browsertest_util.h"
#include <memory>
#include <string>
#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/apps/app_service/app_launch_params.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/apps/app_service/browser_app_launcher.h"
#include "chrome/browser/extensions/api/tabs/tabs_api.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/apps/chrome_app_delegate.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/extensions/app_launch_params.h"
#include "chrome/browser/web_applications/extension_status_utils.h"
#include "components/services/app_service/public/cpp/app_launch_util.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/browser/app_window/app_window_contents.h"
#include "extensions/browser/app_window/app_window_registry.h"
#include "extensions/browser/app_window/native_app_window.h"
#include "extensions/browser/process_manager.h"
#include "extensions/common/constants.h"
#include "extensions/common/switches.h"
#include "extensions/test/extension_test_message_listener.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ui/ash/cast_config/cast_config_controller_media_router.h"
#include "components/media_router/browser/media_routes_observer.h"
#include "testing/gmock/include/gmock/gmock.h"
#endif
WebContents;
namespace {
const char kAppWindowTestApp[] = …;
}
namespace extensions {
utils;
PlatformAppBrowserTest::PlatformAppBrowserTest()
: … { … }
PlatformAppBrowserTest::~PlatformAppBrowserTest() { … }
void PlatformAppBrowserTest::SetUpCommandLine(base::CommandLine* command_line) { … }
void PlatformAppBrowserTest::SetUpOnMainThread() { … }
void PlatformAppBrowserTest::TearDownOnMainThread() { … }
AppWindow* PlatformAppBrowserTest::GetFirstAppWindowForBrowser(
Browser* browser) { … }
const Extension* PlatformAppBrowserTest::LoadAndLaunchPlatformApp(
const char* name,
ExtensionTestMessageListener* listener) { … }
const Extension* PlatformAppBrowserTest::LoadAndLaunchPlatformApp(
const char* name,
const std::string& message) { … }
const Extension* PlatformAppBrowserTest::InstallPlatformApp(const char* name) { … }
const Extension* PlatformAppBrowserTest::InstallHostedApp() { … }
const Extension* PlatformAppBrowserTest::InstallAndLaunchPlatformApp(
const char* name) { … }
void PlatformAppBrowserTest::LaunchPlatformApp(const Extension* extension) { … }
void PlatformAppBrowserTest::LaunchHostedApp(const Extension* extension) { … }
WebContents* PlatformAppBrowserTest::GetFirstAppWindowWebContents() { … }
AppWindow* PlatformAppBrowserTest::GetFirstAppWindow() { … }
AppWindow* PlatformAppBrowserTest::GetFirstAppWindowForApp(
const std::string& app_id) { … }
size_t PlatformAppBrowserTest::RunGetWindowsFunctionForExtension(
const Extension* extension) { … }
bool PlatformAppBrowserTest::RunGetWindowFunctionForExtension(
int window_id,
const Extension* extension) { … }
size_t PlatformAppBrowserTest::GetAppWindowCount() { … }
size_t PlatformAppBrowserTest::GetAppWindowCountForApp(
const std::string& app_id) { … }
AppWindow* PlatformAppBrowserTest::CreateAppWindow(
content::BrowserContext* context,
const Extension* extension) { … }
AppWindow* PlatformAppBrowserTest::CreateAppWindowFromParams(
content::BrowserContext* context,
const Extension* extension,
const AppWindow::CreateParams& params) { … }
void PlatformAppBrowserTest::CloseAppWindow(AppWindow* window) { … }
void PlatformAppBrowserTest::CallAdjustBoundsToBeVisibleOnScreenForAppWindow(
AppWindow* window,
const gfx::Rect& cached_bounds,
const gfx::Rect& cached_screen_bounds,
const gfx::Rect& current_screen_bounds,
const gfx::Size& minimum_size,
gfx::Rect* bounds) { … }
AppWindow* PlatformAppBrowserTest::CreateTestAppWindow(
const std::string& window_create_options) { … }
NativeAppWindow* PlatformAppBrowserTest::GetNativeAppWindowForAppWindow(
AppWindow* window) { … }
void ExperimentalPlatformAppBrowserTest::SetUpCommandLine(
base::CommandLine* command_line) { … }
}