#include "build/build_config.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "extensions/browser/background_script_executor.h"
#include "extensions/browser/extension_util.h"
#include "extensions/browser/script_executor.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/features/feature_developer_mode_only.h"
#include "extensions/test/extension_test_message_listener.h"
#include "extensions/test/result_catcher.h"
#include "extensions/test/test_extension_dir.h"
#include "net/dns/mock_host_resolver.h"
namespace extensions {
class UserScriptsAPITest : public ExtensionApiTest { … };
UserScriptsAPITest::UserScriptsAPITest() { … }
#if (BUILDFLAG(IS_LINUX) && !defined(NDEBUG)) || \
(BUILDFLAG(IS_CHROMEOS) && defined(MEMORY_SANITIZER))
#define MAYBE_RegisterUserScripts …
#else
#define MAYBE_RegisterUserScripts …
#endif
IN_PROC_BROWSER_TEST_F(UserScriptsAPITest, MAYBE_RegisterUserScripts) { … }
IN_PROC_BROWSER_TEST_F(UserScriptsAPITest, GetUserScripts) { … }
IN_PROC_BROWSER_TEST_F(UserScriptsAPITest, UnregisterUserScripts) { … }
IN_PROC_BROWSER_TEST_F(UserScriptsAPITest, UpdateUserScripts) { … }
#if BUILDFLAG(IS_CHROMEOS) && defined(MEMORY_SANITIZER)
#define MAYBE_ConfigureWorld …
#else
#define MAYBE_ConfigureWorld …
#endif
IN_PROC_BROWSER_TEST_F(UserScriptsAPITest, MAYBE_ConfigureWorld) { … }
IN_PROC_BROWSER_TEST_F(UserScriptsAPITest, GetAndRemoveWorlds) { … }
IN_PROC_BROWSER_TEST_F(UserScriptsAPITest,
UserScriptInjectionOrderIsAlphabetical) { … }
IN_PROC_BROWSER_TEST_F(UserScriptsAPITest,
UserScriptsAreDisabledWhenDevModeIsDisabled) { … }
class PersistentUserScriptsAPITest : public UserScriptsAPITest { … };
IN_PROC_BROWSER_TEST_F(PersistentUserScriptsAPITest,
PRE_PRE_PersistentScripts) { … }
IN_PROC_BROWSER_TEST_F(PersistentUserScriptsAPITest, PRE_PersistentScripts) { … }
IN_PROC_BROWSER_TEST_F(PersistentUserScriptsAPITest, PersistentScripts) { … }
IN_PROC_BROWSER_TEST_F(PersistentUserScriptsAPITest,
PRE_PRE_PersistentWorldConfiguration) { … }
IN_PROC_BROWSER_TEST_F(PersistentUserScriptsAPITest,
PRE_PersistentWorldConfiguration) { … }
IN_PROC_BROWSER_TEST_F(PersistentUserScriptsAPITest,
PersistentWorldConfiguration) { … }
class UserScriptsAPITestWithoutDeveloperMode : public UserScriptsAPITest { … };
IN_PROC_BROWSER_TEST_F(UserScriptsAPITestWithoutDeveloperMode,
UserScriptsAPIIsUnavailableWithoutDeveloperMode) { … }
IN_PROC_BROWSER_TEST_F(UserScriptsAPITestWithoutDeveloperMode,
PRE_UserScriptsDisabledOnStartupIfDevModeOff) { … }
IN_PROC_BROWSER_TEST_F(UserScriptsAPITestWithoutDeveloperMode,
UserScriptsDisabledOnStartupIfDevModeOff) { … }
}