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

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

Issue 2784753003: CSP: Enable whitelisting of external JavaScript via hashes (Closed)
Patch Set: webkit_unit_tests builds Created 3 years, 9 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
Index: third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
index 86f819efed137e93a3c26eb22bd2d840b3417a89..9aa80319cf87e81de3d94cd2e055a6731ca62a03 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
@@ -165,7 +165,7 @@ TEST_F(CSPDirectiveListTest, AllowScriptFromSourceNoNonce) {
createList(test.list, ContentSecurityPolicyHeaderTypeReport);
EXPECT_EQ(test.expected,
directiveList->allowScriptFromSource(
- scriptSrc, String(), ParserInserted,
+ scriptSrc, String(), IntegrityMetadataSet(), ParserInserted,
ResourceRequest::RedirectStatus::NoRedirect,
SecurityViolationReportingPolicy::SuppressReporting));
@@ -174,7 +174,7 @@ TEST_F(CSPDirectiveListTest, AllowScriptFromSourceNoNonce) {
createList(test.list, ContentSecurityPolicyHeaderTypeEnforce);
EXPECT_EQ(test.expected,
directiveList->allowScriptFromSource(
- scriptSrc, String(), ParserInserted,
+ scriptSrc, String(), IntegrityMetadataSet(), ParserInserted,
ResourceRequest::RedirectStatus::NoRedirect,
SecurityViolationReportingPolicy::SuppressReporting));
}
@@ -222,8 +222,8 @@ TEST_F(CSPDirectiveListTest, AllowFromSourceWithNonce) {
ContentSecurityPolicyHeaderTypeReport);
EXPECT_EQ(test.expected,
directiveList->allowScriptFromSource(
- resource, String(test.nonce), ParserInserted,
- ResourceRequest::RedirectStatus::NoRedirect,
+ resource, String(test.nonce), IntegrityMetadataSet(),
+ ParserInserted, ResourceRequest::RedirectStatus::NoRedirect,
SecurityViolationReportingPolicy::SuppressReporting));
// Enforce 'script-src'
@@ -231,8 +231,8 @@ TEST_F(CSPDirectiveListTest, AllowFromSourceWithNonce) {
ContentSecurityPolicyHeaderTypeEnforce);
EXPECT_EQ(test.expected,
directiveList->allowScriptFromSource(
- resource, String(test.nonce), ParserInserted,
- ResourceRequest::RedirectStatus::NoRedirect,
+ resource, String(test.nonce), IntegrityMetadataSet(),
+ ParserInserted, ResourceRequest::RedirectStatus::NoRedirect,
SecurityViolationReportingPolicy::SuppressReporting));
// Report-only 'style-src'
@@ -258,8 +258,8 @@ TEST_F(CSPDirectiveListTest, AllowFromSourceWithNonce) {
ContentSecurityPolicyHeaderTypeReport);
EXPECT_EQ(test.expected,
directiveList->allowScriptFromSource(
- resource, String(test.nonce), ParserInserted,
- ResourceRequest::RedirectStatus::NoRedirect,
+ resource, String(test.nonce), IntegrityMetadataSet(),
+ ParserInserted, ResourceRequest::RedirectStatus::NoRedirect,
SecurityViolationReportingPolicy::SuppressReporting));
EXPECT_EQ(test.expected,
directiveList->allowStyleFromSource(
@@ -272,8 +272,8 @@ TEST_F(CSPDirectiveListTest, AllowFromSourceWithNonce) {
ContentSecurityPolicyHeaderTypeEnforce);
EXPECT_EQ(test.expected,
directiveList->allowScriptFromSource(
- resource, String(test.nonce), ParserInserted,
- ResourceRequest::RedirectStatus::NoRedirect,
+ resource, String(test.nonce), IntegrityMetadataSet(),
+ ParserInserted, ResourceRequest::RedirectStatus::NoRedirect,
SecurityViolationReportingPolicy::SuppressReporting));
EXPECT_EQ(test.expected,
directiveList->allowStyleFromSource(

Powered by Google App Engine
This is Rietveld 408576698