#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/values_test_util.h"
#include "base/values.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "extensions/browser/renderer_startup_helper.h"
#include "extensions/browser/script_executor.h"
#include "extensions/common/extension_builder.h"
#include "extensions/test/result_catcher.h"
#include "extensions/test/test_extension_dir.h"
#include "net/dns/mock_host_resolver.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
namespace {
constexpr char kCheckIfEvalAllowedScriptSource[] = …;
constexpr char kGetMessagingProperties[] = …;
}
class UserScriptWorldBrowserTest : public ExtensionApiTest { … };
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
LimitedAPIsAreAvailableInUserScriptWorlds) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
UserScriptWorldCspDefaultsToExtensionsAndCanBeUpdated) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
CspUpdatesDoNotApplyToExistingUserScriptWorlds) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
CspMayBeGreedilyInitializedOnDocumentCreation) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest, SendMessageAPI) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest, ConnectAPI) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
TryingToSendMessageToOtherExtensionTriggersError) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
MessagingAPIsAreNotExposedIfEnableMessagingIsFalse) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
DifferentUserScriptWorldsAreIsolated) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
UniquePropertiesPerUserScriptWorld_CSP) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
ClearingUserScriptWorldConfigurations) { … }
IN_PROC_BROWSER_TEST_F(UserScriptWorldBrowserTest,
UniquePropertiesPerUserScriptWorld_Messaging) { … }
}