chromium/extensions/common/manifest_handlers/csp_info_unittest.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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[] =;

}  // namespace

CSPInfoUnitTest;

TEST_F(CSPInfoUnitTest, SandboxedPages) {}

TEST_F(CSPInfoUnitTest, CSPStringKey) {}

TEST_F(CSPInfoUnitTest, CSPDictionary_ExtensionPages) {}

// Tests the requirements for object-src specifications.
TEST_F(CSPInfoUnitTest, ObjectSrcRequirements) {}

TEST_F(CSPInfoUnitTest, AllowWasmInMV3) {}

TEST_F(CSPInfoUnitTest, CSPDictionary_Sandbox) {}

// Ensures that using a dictionary for the keys::kContentSecurityPolicy manifest
// key is mandatory for manifest v3 extensions and that defaults are applied
// correctly.
TEST_F(CSPInfoUnitTest, CSPDictionaryMandatoryForV3) {}

// Ensure the CSP dictionary is disallowed for mv2 extensions.
TEST_F(CSPInfoUnitTest, CSPDictionaryDisallowedForV2) {}

}  // namespace extensions