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

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

Issue 1783653002: save-data header value gets appended on page refreshes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.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/loader/FrameFetchContextTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
index c000b80742cbc857244ddee763d294e65ee5b7b9..22c206f078a09a3c74fea5f3f19a42c22d2ac78b 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -564,6 +564,11 @@ TEST_F(FrameFetchContextTest, EnableDataSaver)
ResourceRequest resourceRequest("http://www.example.com");
fetchContext->addAdditionalRequestHeaders(resourceRequest, FetchMainResource);
EXPECT_STREQ("on", resourceRequest.httpHeaderField("Save-Data").utf8().data());
+
+ // Subsequent call to addAdditionalRequestHeaders should not append to the
+ // save-data header.
+ fetchContext->addAdditionalRequestHeaders(resourceRequest, FetchMainResource);
+ EXPECT_STREQ("on", resourceRequest.httpHeaderField("Save-Data").utf8().data());
}
TEST_F(FrameFetchContextTest, DisabledDataSaver)
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698