#include <stddef.h>
#include <stdint.h>
#include <vector>
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/one_shot_event.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/scoped_multi_source_observation.h"
#include "base/strings/string_util.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/extension_util.h"
#include "chrome/browser/extensions/scoped_test_mv2_enabler.h"
#include "chrome/browser/prefs/chrome_pref_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extension_util.h"
#include "extensions/browser/test_extension_registry_observer.h"
#include "extensions/browser/user_script_loader.h"
#include "extensions/browser/user_script_manager.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_set.h"
#include "extensions/common/feature_switch.h"
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_handlers/content_scripts_handler.h"
#include "extensions/common/switches.h"
#include "extensions/test/test_content_script_load_waiter.h"
#include "net/base/filename_util.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ash/profiles/profile_helper.h"
#endif
FeatureSwitch;
ExtensionRegistry;
class ManifestContentScriptWaiter
: public extensions::UserScriptLoader::Observer { … };
class ExtensionStartupTestBase : public InProcessBrowserTest { … };
ExtensionStartupTest;
IN_PROC_BROWSER_TEST_F(ExtensionStartupTest, Test) { … }
IN_PROC_BROWSER_TEST_F(ExtensionStartupTest, NoFileAccess) { … }
class ExtensionsLoadTest : public ExtensionStartupTestBase { … };
IN_PROC_BROWSER_TEST_F(ExtensionsLoadTest, Test) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(ExtensionsLoadTest,
SigninProfileCommandLineExtensionsDontLoad) {
EXPECT_EQ(0, GetNonComponentEnabledExtensionCount(
ash::ProfileHelper::GetSigninProfile()));
}
#endif
class ExtensionsLoadMultipleTest : public ExtensionStartupTestBase { … };
IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { … }
class DeprecatedLoadComponentExtensionSwitchBrowserTest
: public extensions::ExtensionBrowserTest { … };
void DeprecatedLoadComponentExtensionSwitchBrowserTest::SetUpCommandLine(
base::CommandLine* command_line) { … }
IN_PROC_BROWSER_TEST_F(DeprecatedLoadComponentExtensionSwitchBrowserTest,
DefunctLoadComponentExtensionFlag) { … }
class DisableExtensionsExceptBrowserTest
: public extensions::ExtensionBrowserTest { … };
void DisableExtensionsExceptBrowserTest::SetUpCommandLine(
base::CommandLine* command_line) { … }
IN_PROC_BROWSER_TEST_F(DisableExtensionsExceptBrowserTest,
DisableExtensionsExceptFlag) { … }