#include "base/auto_reset.h"
#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_refptr.h"
#include "base/strings/pattern.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/install_verifier.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/web_applications/extension_status_utils.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/api/management/management_api.h"
#include "extensions/browser/api/management/management_api_constants.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/browser/extension_dialog_auto_confirm.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_host_test_helper.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/extension_id.h"
#include "extensions/test/extension_test_message_listener.h"
keys;
namespace extensions {
namespace {
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
bool ExpectChromeAppsDefaultEnabled() { … }
#endif
}
test_utils;
class ExtensionManagementApiBrowserTest : public ExtensionBrowserTest { … };
ContextType;
class ExtensionManagementApiTestWithBackgroundType
: public ExtensionManagementApiBrowserTest,
public ::testing::WithParamInterface<ContextType> { … };
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType,
InstallEvent) { … }
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType,
LaunchApp) { … }
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType,
NoLaunchAppDeprecated) { … }
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType,
LaunchAppFromBackground) { … }
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType,
NoLaunchAppFromBackgroundDeprecated) { … }
#endif
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType,
SelfUninstall) { … }
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType,
SelfUninstallNoPermissions) { … }
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType, Get) { … }
IN_PROC_BROWSER_TEST_P(ExtensionManagementApiTestWithBackgroundType,
GetSelfNoPermissions) { … }
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiBrowserTest,
CreateAppShortcutConfirmDialog) { … }
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiBrowserTest,
GetAllIncludesTerminated) { … }
class ExtensionManagementApiEscalationTest :
public ExtensionManagementApiBrowserTest { … };
const char ExtensionManagementApiEscalationTest::kId[] = …;
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiEscalationTest,
DisabledReason) { … }
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiEscalationTest,
SetEnabled) { … }
}