chromium/services/network/public/cpp/content_security_policy/csp_context_unittest.cc

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

#include <set>
#include <string_view>

#include "services/network/public/cpp/content_security_policy/content_security_policy.h"
#include "services/network/public/cpp/content_security_policy/csp_context.h"
#include "services/network/public/mojom/content_security_policy.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/origin.h"

namespace network {

CSPDirectiveName;

namespace {

class CSPContextTest : public CSPContext {};

mojom::ContentSecurityPolicyPtr EmptyCSP() {}

// Build a new policy made of only one directive and no report endpoints.
mojom::ContentSecurityPolicyPtr BuildPolicy(mojom::CSPSourcePtr self_source,
                                            CSPDirectiveName directive_name,
                                            mojom::CSPSourcePtr source) {}

// Build a new policy made of only one directive and no report endpoints.
mojom::ContentSecurityPolicyPtr BuildPolicy(mojom::CSPSourcePtr self_source,
                                            CSPDirectiveName directive_name,
                                            mojom::CSPSourcePtr source_1,
                                            mojom::CSPSourcePtr source_2) {}

mojom::CSPSourcePtr BuildCSPSource(const char* scheme, const char* host) {}

network::mojom::SourceLocationPtr SourceLocation() {}

}  // namespace

TEST(CSPContextTest, SchemeShouldBypassCSP) {}

TEST(CSPContextTest, MultiplePolicies) {}

TEST(CSPContextTest, SanitizeDataForUseInCspViolation) {}

// When several policies are infringed, all of them must be reported.
TEST(CSPContextTest, MultipleInfringement) {}

// Tests that the CheckCSPDisposition parameter is obeyed.
TEST(CSPContextTest, CheckCSPDisposition) {}

TEST(CSPContextTest, BlockedDespiteWildcard) {}

}  // namespace network