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

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

Issue 2401573003: CSP: Fix 'strict-dynamic' with multiple policies. (Closed)
Patch Set: Tests compile. 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
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 540a83849e476cd58714200f63c937c932907fb3..62361d795bfa96444fcac53ef758cf07e52ef014 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
@@ -140,7 +140,7 @@ TEST_F(CSPDirectiveListTest, AllowScriptFromSourceNoNonce) {
Member<CSPDirectiveList> directiveList =
createList(test.list, ContentSecurityPolicyHeaderTypeReport);
EXPECT_EQ(test.expected, directiveList->allowScriptFromSource(
- scriptSrc, String(),
+ scriptSrc, String(), ParserInserted,
ResourceRequest::RedirectStatus::NoRedirect,
ContentSecurityPolicy::SuppressReport));
@@ -148,7 +148,7 @@ TEST_F(CSPDirectiveListTest, AllowScriptFromSourceNoNonce) {
directiveList =
createList(test.list, ContentSecurityPolicyHeaderTypeEnforce);
EXPECT_EQ(test.expected, directiveList->allowScriptFromSource(
- scriptSrc, String(),
+ scriptSrc, String(), ParserInserted,
ResourceRequest::RedirectStatus::NoRedirect,
ContentSecurityPolicy::SuppressReport));
}
@@ -195,7 +195,7 @@ TEST_F(CSPDirectiveListTest, AllowFromSourceWithNonce) {
createList(String("script-src ") + test.list,
ContentSecurityPolicyHeaderTypeReport);
EXPECT_EQ(test.expected, directiveList->allowScriptFromSource(
- resource, String(test.nonce),
+ resource, String(test.nonce), ParserInserted,
ResourceRequest::RedirectStatus::NoRedirect,
ContentSecurityPolicy::SuppressReport));
@@ -203,7 +203,7 @@ TEST_F(CSPDirectiveListTest, AllowFromSourceWithNonce) {
directiveList = createList(String("script-src ") + test.list,
ContentSecurityPolicyHeaderTypeEnforce);
EXPECT_EQ(test.expected, directiveList->allowScriptFromSource(
- resource, String(test.nonce),
+ resource, String(test.nonce), ParserInserted,
ResourceRequest::RedirectStatus::NoRedirect,
ContentSecurityPolicy::SuppressReport));
@@ -227,7 +227,7 @@ TEST_F(CSPDirectiveListTest, AllowFromSourceWithNonce) {
directiveList = createList(String("default-src ") + test.list,
ContentSecurityPolicyHeaderTypeReport);
EXPECT_EQ(test.expected, directiveList->allowScriptFromSource(
- resource, String(test.nonce),
+ resource, String(test.nonce), ParserInserted,
ResourceRequest::RedirectStatus::NoRedirect,
ContentSecurityPolicy::SuppressReport));
EXPECT_EQ(test.expected, directiveList->allowStyleFromSource(
@@ -239,7 +239,7 @@ TEST_F(CSPDirectiveListTest, AllowFromSourceWithNonce) {
directiveList = createList(String("default-src ") + test.list,
ContentSecurityPolicyHeaderTypeEnforce);
EXPECT_EQ(test.expected, directiveList->allowScriptFromSource(
- resource, String(test.nonce),
+ resource, String(test.nonce), ParserInserted,
ResourceRequest::RedirectStatus::NoRedirect,
ContentSecurityPolicy::SuppressReport));
EXPECT_EQ(test.expected, directiveList->allowStyleFromSource(

Powered by Google App Engine
This is Rietveld 408576698