#include "extensions/common/manifest_handlers/csp_info.h"
#include <string_view>
#include "base/strings/stringprintf.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/values_test_util.h"
#include "components/version_info/channel.h"
#include "extensions/common/error_utils.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/features/feature_channel.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/manifest_test.h"
namespace extensions {
namespace {
errors;
keys;
std::string GetInvalidManifestKeyError(std::string_view key) { … }
const char kDefaultSandboxedPageCSP[] = …;
const char kDefaultExtensionPagesCSP[] = …;
const char kDefaultSecureCSP[] = …;
}
CSPInfoUnitTest;
TEST_F(CSPInfoUnitTest, SandboxedPages) { … }
TEST_F(CSPInfoUnitTest, CSPStringKey) { … }
TEST_F(CSPInfoUnitTest, CSPDictionary_ExtensionPages) { … }
TEST_F(CSPInfoUnitTest, ObjectSrcRequirements) { … }
TEST_F(CSPInfoUnitTest, AllowWasmInMV3) { … }
TEST_F(CSPInfoUnitTest, CSPDictionary_Sandbox) { … }
TEST_F(CSPInfoUnitTest, CSPDictionaryMandatoryForV3) { … }
TEST_F(CSPInfoUnitTest, CSPDictionaryDisallowedForV2) { … }
}