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

Unified Diff: net/spdy/spdy_framer_test.cc

Issue 247793002: HPACK: Refactor and simplify HpackOutputStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/spdy/hpack_output_stream_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_framer_test.cc
diff --git a/net/spdy/spdy_framer_test.cc b/net/spdy/spdy_framer_test.cc
index 9a9b843825290826b6c3461e69f7670ef103864d..4982b2dfc1c4154466591227064cc26fc503382c 100644
--- a/net/spdy/spdy_framer_test.cc
+++ b/net/spdy/spdy_framer_test.cc
@@ -903,10 +903,12 @@ TEST_P(SpdyFramerTest, MultiValueHeader) {
frame.WriteString("name");
frame.WriteString(value);
} else if (spdy_version_ > SPDY3) {
- HpackOutputStream output_stream(1024);
- output_stream.AppendLiteralHeaderNoIndexingWithName("name", value);
+ // TODO(jgraettinger): If this pattern appears again, move to test class.
+ std::map<string, string> header_set;
+ header_set["name"] = value;
string buffer;
- output_stream.TakeString(&buffer);
+ HpackEncoder encoder;
+ encoder.EncodeHeaderSet(header_set, &buffer);
frame.WriteBytes(&buffer[0], buffer.size());
} else {
frame.WriteUInt32(1); // Number of headers.
« no previous file with comments | « net/spdy/hpack_output_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698