#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() { … }
mojom::ContentSecurityPolicyPtr BuildPolicy(mojom::CSPSourcePtr self_source,
CSPDirectiveName directive_name,
mojom::CSPSourcePtr source) { … }
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() { … }
}
TEST(CSPContextTest, SchemeShouldBypassCSP) { … }
TEST(CSPContextTest, MultiplePolicies) { … }
TEST(CSPContextTest, SanitizeDataForUseInCspViolation) { … }
TEST(CSPContextTest, MultipleInfringement) { … }
TEST(CSPContextTest, CheckCSPDisposition) { … }
TEST(CSPContextTest, BlockedDespiteWildcard) { … }
}