#include "third_party/blink/renderer/core/frame/csp/csp_source.h"
#include "base/test/with_feature_override.h"
#include "services/network/public/mojom/content_security_policy.mojom-blink.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "url/url_features.h"
namespace blink {
TEST(CSPSourceTest, BasicMatching) { … }
TEST(CSPSourceTest, BasicPathMatching) { … }
TEST(CSPSourceTest, WildcardMatching) { … }
TEST(CSPSourceTest, RedirectMatching) { … }
TEST(CSPSourceTest, InsecureSchemeMatchesSecureScheme) { … }
TEST(CSPSourceTest, InsecureHostSchemeMatchesSecureScheme) { … }
class CSPSourceParamTest : public base::test::WithFeatureOverride,
public ::testing::Test { … };
INSTANTIATE_FEATURE_OVERRIDE_TEST_SUITE(…);
TEST_P(CSPSourceParamTest, SchemeIsEmpty) { … }
TEST(CSPSourceTest, InsecureHostSchemePortMatchesSecurePort) { … }
TEST(CSPSourceTest, HostMatches) { … }
TEST_P(CSPSourceParamTest, MatchingAsSelf) { … }
}