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

Side by Side Diff: net/spdy/hpack_round_trip_test.cc

Issue 537663002: HPACK: encode :pseudo and indexed headers first. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « net/spdy/hpack_output_stream.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cmath> 5 #include <cmath>
6 #include <ctime> 6 #include <ctime>
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 headers["cookie"] = "baz=bing; foo=bar"; 95 headers["cookie"] = "baz=bing; foo=bar";
96 EXPECT_TRUE(RoundTrip(headers)); 96 EXPECT_TRUE(RoundTrip(headers));
97 } 97 }
98 { 98 {
99 map<string, string> headers; 99 map<string, string> headers;
100 headers[":authority"] = "www.example.com"; 100 headers[":authority"] = "www.example.com";
101 headers[":method"] = "GET"; 101 headers[":method"] = "GET";
102 headers[":path"] = "/"; 102 headers[":path"] = "/";
103 headers[":scheme"] = "http"; 103 headers[":scheme"] = "http";
104 headers["cache-control"] = "no-cache"; 104 headers["cache-control"] = "no-cache";
105 headers["cookie"] = "fizzle=fazzle; foo=bar"; 105 headers["cookie"] = "foo=bar; fizzle=fazzle";
106 EXPECT_TRUE(RoundTrip(headers)); 106 EXPECT_TRUE(RoundTrip(headers));
107 } 107 }
108 { 108 {
109 map<string, string> headers; 109 map<string, string> headers;
110 headers[":authority"] = "www.example.com"; 110 headers[":authority"] = "www.example.com";
111 headers[":method"] = "GET"; 111 headers[":method"] = "GET";
112 headers[":path"] = "/index.html"; 112 headers[":path"] = "/index.html";
113 headers[":scheme"] = "https"; 113 headers[":scheme"] = "https";
114 headers["custom-key"] = "custom-value"; 114 headers["custom-key"] = "custom-value";
115 headers["cookie"] = "baz=bing; fizzle=fazzle; garbage"; 115 headers["cookie"] = "baz=bing; fizzle=fazzle; garbage";
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 headers[name] = value; 166 headers[name] = value;
167 } 167 }
168 EXPECT_TRUE(RoundTrip(headers)); 168 EXPECT_TRUE(RoundTrip(headers));
169 } 169 }
170 } 170 }
171 171
172 } // namespace 172 } // namespace
173 173
174 } // namespace net 174 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/hpack_output_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698