OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |