#include "chrome/browser/web_applications/test/prevent_close_test_base.h"
#include <string_view>
#include "base/json/json_reader.h"
#include "base/values.h"
#include "chrome/browser/policy/policy_test_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/web_applications/test/web_app_install_test_utils.h"
#include "chrome/browser/web_applications/test/web_app_test_observers.h"
#include "chrome/browser/web_applications/web_app_id_constants.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "components/policy/core/browser/browser_policy_connector.h"
#include "components/policy/core/browser/browser_policy_connector_base.h"
#include "components/policy/core/common/mock_configuration_policy_provider.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/policy_constants.h"
#include "components/webapps/common/web_app_id.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/window_open_disposition.h"
#include "url/gurl.h"
PreventCloseTestBase::PreventCloseTestBase() = default;
PreventCloseTestBase::~PreventCloseTestBase() = default;
void PreventCloseTestBase::SetUpInProcessBrowserTestFixture() { … }
void PreventCloseTestBase::TearDownInProcessBrowserTestFixture() { … }
void PreventCloseTestBase::SetPolicies(
std::string_view web_app_settings,
std::string_view web_app_install_force_list) { … }
void PreventCloseTestBase::SetPoliciesAndWaitUntilInstalled(
const webapps::AppId& app_id,
std::string_view web_app_settings,
std::string_view web_app_install_force_list) { … }
void PreventCloseTestBase::ClearWebAppSettings() { … }
void PreventCloseTestBase::InstallPWA(const GURL& app_url,
const webapps::AppId& app_id) { … }
Browser* PreventCloseTestBase::LaunchPWA(const webapps::AppId& app_id,
bool launch_in_window) { … }
base::Value PreventCloseTestBase::ReturnPolicyValueFromJson(
std::string_view policy) { … }
Profile* PreventCloseTestBase::profile() { … }