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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp

Issue 2892903002: Renamed `embedding-csp` HTTP request header to `required-csp`. (Closed)
Patch Set: Created 3 years, 7 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/loader/FrameFetchContextTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
index 894c2b5812315bf3b26fc92cdea9b09203a9f494..e89e4d1a72ecbde388a176f5bc0a73fdea12f441 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -279,10 +279,10 @@ class FrameFetchContextModifyRequestTest : public FrameFetchContextTest {
}
}
- void ExpectSetEmbeddingCSPRequestHeader(
+ void ExpectSetRequiredCSPRequestHeader(
const char* input,
WebURLRequest::FrameType frame_type,
- const AtomicString& expected_embedding_csp) {
+ const AtomicString& expected_required_csp) {
KURL input_url(kParsedURLString, input);
ResourceRequest resource_request(input_url);
resource_request.SetRequestContext(WebURLRequest::kRequestContextScript);
@@ -290,8 +290,8 @@ class FrameFetchContextModifyRequestTest : public FrameFetchContextTest {
fetch_context->ModifyRequestForCSP(resource_request);
- EXPECT_EQ(expected_embedding_csp,
- resource_request.HttpHeaderField(HTTPNames::Embedding_CSP));
+ EXPECT_EQ(expected_required_csp,
+ resource_request.HttpHeaderField(HTTPNames::Required_CSP));
}
void SetFrameOwnerBasedOnFrameType(WebURLRequest::FrameType frame_type,
@@ -440,7 +440,7 @@ TEST_F(FrameFetchContextModifyRequestTest, SendUpgradeInsecureRequestHeader) {
}
}
-TEST_F(FrameFetchContextModifyRequestTest, SendEmbeddingCSPHeader) {
+TEST_F(FrameFetchContextModifyRequestTest, SendRequiredCSPHeader) {
struct TestCase {
const char* to_request;
WebURLRequest::FrameType frame_type;
@@ -456,14 +456,14 @@ TEST_F(FrameFetchContextModifyRequestTest, SendEmbeddingCSPHeader) {
for (const auto& test : tests) {
SetFrameOwnerBasedOnFrameType(test.frame_type, iframe, required_csp);
- ExpectSetEmbeddingCSPRequestHeader(
+ ExpectSetRequiredCSPRequestHeader(
test.to_request, test.frame_type,
test.frame_type == WebURLRequest::kFrameTypeNested ? required_csp
: g_null_atom);
SetFrameOwnerBasedOnFrameType(test.frame_type, iframe,
another_required_csp);
- ExpectSetEmbeddingCSPRequestHeader(
+ ExpectSetRequiredCSPRequestHeader(
test.to_request, test.frame_type,
test.frame_type == WebURLRequest::kFrameTypeNested
? another_required_csp
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698