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

Unified Diff: net/quic/spdy_utils_test.cc

Issue 2009623002: SpdyUtils support coalescing multi-value headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SpdyUtils support coalescing multi-value headers. Created 4 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
« no previous file with comments | « net/quic/spdy_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/spdy_utils_test.cc
diff --git a/net/quic/spdy_utils_test.cc b/net/quic/spdy_utils_test.cc
index c4f094379747b668cf361d54b147db4fc4674745..a64c3a7a689a0829a9af6c1ffbe90d3c07ed13a6 100644
--- a/net/quic/spdy_utils_test.cc
+++ b/net/quic/spdy_utils_test.cc
@@ -202,6 +202,20 @@ TEST(SpdyUtilsTest, CopyAndValidateHeadersMultipleValues) {
EXPECT_EQ(-1, content_length);
}
+TEST(SpdyUtilsTest, CopyAndValidateHeadersMoreThanTwoValues) {
+ auto headers = FromList({{"set-cookie", "value1"},
+ {"set-cookie", "value2"},
+ {"set-cookie", "value3"}});
+ int64_t content_length = -1;
+ SpdyHeaderBlock block;
+ ASSERT_TRUE(
+ SpdyUtils::CopyAndValidateHeaders(*headers, &content_length, &block));
+ EXPECT_THAT(block,
+ UnorderedElementsAre(Pair(
+ "set-cookie", StringPiece("value1\0value2\0value3", 20))));
+ EXPECT_EQ(-1, content_length);
+}
+
TEST(SpdyUtilsTest, CopyAndValidateHeadersCookie) {
auto headers = FromList({{"foo", "foovalue"},
{"bar", "barvalue"},
« no previous file with comments | « net/quic/spdy_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698