OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/http/http_response_headers.h" | 5 #include "net/http/http_response_headers.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <iostream> | 10 #include <iostream> |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 // Test filtering of cookie headers. | 437 // Test filtering of cookie headers. |
438 {HttpResponseHeaders::PERSIST_SANS_COOKIES, | 438 {HttpResponseHeaders::PERSIST_SANS_COOKIES, |
439 "HTTP/1.1 200 OK\n" | 439 "HTTP/1.1 200 OK\n" |
440 "Set-Cookie: foo=bar; httponly\n" | 440 "Set-Cookie: foo=bar; httponly\n" |
441 "Set-Cookie: bar=foo\n" | 441 "Set-Cookie: bar=foo\n" |
442 "Bar: 1\n" | 442 "Bar: 1\n" |
443 "Set-Cookie2: bar2=foo2\n", | 443 "Set-Cookie2: bar2=foo2\n", |
444 | 444 |
445 "HTTP/1.1 200 OK\n" | 445 "HTTP/1.1 200 OK\n" |
446 "Bar: 1\n"}, | 446 "Bar: 1\n"}, |
| 447 {HttpResponseHeaders::PERSIST_SANS_COOKIES, |
| 448 "HTTP/1.1 200 OK\n" |
| 449 "Set-Cookie: foo=bar\n" |
| 450 "Foo: 2\n" |
| 451 "Clear-Site-Data: { \"types\" : [ \"cookies\" ] }\n" |
| 452 "Bar: 3\n", |
| 453 |
| 454 "HTTP/1.1 200 OK\n" |
| 455 "Foo: 2\n" |
| 456 "Bar: 3\n"}, |
447 // Test LWS at the end of a header. | 457 // Test LWS at the end of a header. |
448 {HttpResponseHeaders::PERSIST_ALL, | 458 {HttpResponseHeaders::PERSIST_ALL, |
449 "HTTP/1.1 200 OK\n" | 459 "HTTP/1.1 200 OK\n" |
450 "Content-Length: 450 \n" | 460 "Content-Length: 450 \n" |
451 "Content-Encoding: gzip\n", | 461 "Content-Encoding: gzip\n", |
452 | 462 |
453 "HTTP/1.1 200 OK\n" | 463 "HTTP/1.1 200 OK\n" |
454 "Content-Length: 450\n" | 464 "Content-Length: 450\n" |
455 "Content-Encoding: gzip\n"}, | 465 "Content-Encoding: gzip\n"}, |
456 // Test LWS at the end of a header. | 466 // Test LWS at the end of a header. |
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2196 "Fri, 20 Jan 2011 10:40:08 GMT", "Fri, 20 Jan 2011 10:40:12 GMT", | 2206 "Fri, 20 Jan 2011 10:40:08 GMT", "Fri, 20 Jan 2011 10:40:12 GMT", |
2197 "Fri, 20 Jan 2011 10:40:14 GMT", 7}}; | 2207 "Fri, 20 Jan 2011 10:40:14 GMT", 7}}; |
2198 | 2208 |
2199 INSTANTIATE_TEST_CASE_P(HttpResponseHeaders, | 2209 INSTANTIATE_TEST_CASE_P(HttpResponseHeaders, |
2200 GetCurrentAgeTest, | 2210 GetCurrentAgeTest, |
2201 testing::ValuesIn(get_current_age_tests)); | 2211 testing::ValuesIn(get_current_age_tests)); |
2202 | 2212 |
2203 } // namespace | 2213 } // namespace |
2204 | 2214 |
2205 } // namespace net | 2215 } // namespace net |
OLD | NEW |