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

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

Issue 978323002: Upgrade insecure requests: Pipe navigational hosts down into nested documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | « Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | Source/core/loader/FrameLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/ContentSecurityPolicyTest.cpp
diff --git a/Source/core/frame/csp/ContentSecurityPolicyTest.cpp b/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
index 7a3017f043ddb93632115324fe39de2fb8f16053..def1187ab22d526e498e7082edab7bf9ab018805 100644
--- a/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
+++ b/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
@@ -46,6 +46,7 @@ TEST_F(ContentSecurityPolicyTest, ParseUpgradeInsecureRequestsDisabled)
csp->bindToExecutionContext(document.get());
EXPECT_EQ(SecurityContext::InsecureRequestsDoNotUpgrade, document->insecureRequestsPolicy());
+ EXPECT_FALSE(document->insecureNavigationsToUpgrade()->contains(secureOrigin->host().impl()->hash()));
}
TEST_F(ContentSecurityPolicyTest, ParseUpgradeInsecureRequestsEnabled)
@@ -56,6 +57,7 @@ TEST_F(ContentSecurityPolicyTest, ParseUpgradeInsecureRequestsEnabled)
csp->bindToExecutionContext(document.get());
EXPECT_EQ(SecurityContext::InsecureRequestsUpgrade, document->insecureRequestsPolicy());
+ EXPECT_TRUE(document->insecureNavigationsToUpgrade()->contains(secureOrigin->host().impl()->hash()));
}
TEST_F(ContentSecurityPolicyTest, ParseMonitorInsecureRequestsDisabled)
@@ -66,6 +68,7 @@ TEST_F(ContentSecurityPolicyTest, ParseMonitorInsecureRequestsDisabled)
csp->bindToExecutionContext(document.get());
EXPECT_EQ(SecurityContext::InsecureRequestsDoNotUpgrade, document->insecureRequestsPolicy());
+ EXPECT_FALSE(document->insecureNavigationsToUpgrade()->contains(secureOrigin->host().impl()->hash()));
}
TEST_F(ContentSecurityPolicyTest, ParseMonitorInsecureRequestsEnabled)
@@ -76,6 +79,7 @@ TEST_F(ContentSecurityPolicyTest, ParseMonitorInsecureRequestsEnabled)
csp->bindToExecutionContext(document.get());
EXPECT_EQ(SecurityContext::InsecureRequestsDoNotUpgrade, document->insecureRequestsPolicy());
+ EXPECT_FALSE(document->insecureNavigationsToUpgrade()->contains(secureOrigin->host().impl()->hash()));
}
} // namespace
« no previous file with comments | « Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | Source/core/loader/FrameLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698