Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp

Issue 2445823002: Remove CSP referrer directive (Closed)
Patch Set: remove unused test file Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
index 207d34c7d7ecf1a50ff155adb51c9dcc6d6ec2c2..b615e47c5ce1c0f3d12692150033209775e71386 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
@@ -194,42 +194,6 @@ TEST_F(ContentSecurityPolicyTest, IsFrameAncestorsEnforced) {
EXPECT_TRUE(csp->isFrameAncestorsEnforced());
}
-TEST_F(ContentSecurityPolicyTest, MultipleReferrerDirectives) {
- csp->didReceiveHeader("referrer unsafe-url; referrer origin;",
- ContentSecurityPolicyHeaderTypeEnforce,
- ContentSecurityPolicyHeaderSourceHTTP);
- csp->bindToExecutionContext(document.get());
- EXPECT_EQ(ReferrerPolicyOrigin, document->getReferrerPolicy());
-}
-
-TEST_F(ContentSecurityPolicyTest, MultipleReferrerPolicies) {
- csp->didReceiveHeader("referrer unsafe-url;",
- ContentSecurityPolicyHeaderTypeEnforce,
- ContentSecurityPolicyHeaderSourceHTTP);
- csp->bindToExecutionContext(document.get());
- EXPECT_EQ(ReferrerPolicyAlways, document->getReferrerPolicy());
- document->parseAndSetReferrerPolicy("origin");
- EXPECT_EQ(ReferrerPolicyOrigin, document->getReferrerPolicy());
-}
-
-TEST_F(ContentSecurityPolicyTest, UnknownReferrerDirective) {
- csp->didReceiveHeader("referrer unsafe-url; referrer blahblahblah",
- ContentSecurityPolicyHeaderTypeEnforce,
- ContentSecurityPolicyHeaderSourceHTTP);
- csp->bindToExecutionContext(document.get());
- EXPECT_EQ(ReferrerPolicyAlways, document->getReferrerPolicy());
- document->parseAndSetReferrerPolicy("origin");
- document->parseAndSetReferrerPolicy("blahblahblah");
- EXPECT_EQ(ReferrerPolicyOrigin, document->getReferrerPolicy());
-}
-
-TEST_F(ContentSecurityPolicyTest, EmptyReferrerDirective) {
- csp->didReceiveHeader("referrer;", ContentSecurityPolicyHeaderTypeEnforce,
- ContentSecurityPolicyHeaderSourceHTTP);
- csp->bindToExecutionContext(document.get());
- EXPECT_EQ(ReferrerPolicyNever, document->getReferrerPolicy());
-}
-
// Tests that frame-ancestors directives are discarded from policies
// delivered in <meta> elements.
TEST_F(ContentSecurityPolicyTest, FrameAncestorsInMeta) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698