chromium/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.h

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_VIEWS_WEB_APPS_WEB_APP_INTEGRATION_TEST_DRIVER_H_
#define CHROME_BROWSER_UI_VIEWS_WEB_APPS_WEB_APP_INTEGRATION_TEST_DRIVER_H_

#include <iosfwd>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <vector>

#include "base/auto_reset.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/location_bar/intent_chip_button.h"
#include "chrome/browser/web_applications/os_integration/os_integration_manager.h"
#include "chrome/browser/web_applications/test/os_integration_test_override_impl.h"
#include "chrome/browser/web_applications/test/web_app_test_observers.h"
#include "chrome/browser/web_applications/web_app_callback_app_identity.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_ui_manager.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/services/app_service/public/cpp/app_types.h"
#include "components/services/app_service/public/cpp/run_on_os_login_types.h"
#include "components/webapps/browser/install_result_code.h"
#include "components/webapps/common/web_app_id.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "ui/views/widget/any_widget_observer.h"
#include "url/gurl.h"

#if !BUILDFLAG(IS_CHROMEOS)
#include "chrome/browser/ui/webui/app_home/app_home_page_handler.h"
#endif

class Browser;
class PageActionIconView;

namespace base {
class CommandLine;
}  // namespace base

namespace content {
class TestWebUI;
}

namespace web_app::integration_tests {

// Enumerations used by the integration tests framework actions. These are C++
// versions of the enumerations in the file chrome/test/webapps/data/enums.md.

enum class Site : int {};

enum class InstallableSite {};

enum class Title {};

enum class Color {};

enum class ProfileClient {};

enum class ProfileName {};

enum class UserDisplayPreference {};

enum class IsShown {};

enum class IsOn {};

enum class Display {};

enum class WindowOptions {};

enum class ShortcutOptions {};

enum class InstallMode {};

enum class AllowDenyOptions {};

enum class AskAgainOptions {};

enum class FileExtension {};

enum class Number {};

enum class FilesOptions {};

enum class UpdateDialogResponse {};

enum class SubAppInstallDialogOptions {};

enum class AppShimCorruption {};

// These structs are used to store the current state of the world before & after
// each state-change action.

struct TabState {};

struct BrowserState {};

struct AppState {};

struct ProfileState {};

struct StateSnapshot {};
std::ostream& operator<<(std::ostream& os, const StateSnapshot& snapshot);

class WebAppIntegrationTestDriver : WebAppInstallManagerObserver {};

// Simple base browsertest class usable by all non-sync web app integration
// tests.
class WebAppIntegrationTest : public InProcessBrowserTest,
                              public WebAppIntegrationTestDriver::TestDelegate {};

}  // namespace web_app::integration_tests

#endif  // CHROME_BROWSER_UI_VIEWS_WEB_APPS_WEB_APP_INTEGRATION_TEST_DRIVER_H_