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 <algorithm> | 5 #include <algorithm> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/pickle.h" | 9 #include "base/pickle.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 "date: Wed, 28 Nov 2007 00:40:11 GMT\n" | 805 "date: Wed, 28 Nov 2007 00:40:11 GMT\n" |
806 "last-modified: Wed, 28 Nov 2007 00:40:10 GMT\n" | 806 "last-modified: Wed, 28 Nov 2007 00:40:10 GMT\n" |
807 "\n", | 807 "\n", |
808 true | 808 true |
809 }, | 809 }, |
810 // cached permanent redirect | 810 // cached permanent redirect |
811 { "HTTP/1.1 301 Moved Permanently\n" | 811 { "HTTP/1.1 301 Moved Permanently\n" |
812 "\n", | 812 "\n", |
813 false | 813 false |
814 }, | 814 }, |
| 815 // another cached permanent redirect |
| 816 { "HTTP/1.1 308 Permanent Redirect\n" |
| 817 "\n", |
| 818 false |
| 819 }, |
815 // cached redirect: not reusable even though by default it would be | 820 // cached redirect: not reusable even though by default it would be |
816 { "HTTP/1.1 300 Multiple Choices\n" | 821 { "HTTP/1.1 300 Multiple Choices\n" |
817 "Cache-Control: no-cache\n" | 822 "Cache-Control: no-cache\n" |
818 "\n", | 823 "\n", |
819 true | 824 true |
820 }, | 825 }, |
821 // cached forever by default | 826 // cached forever by default |
822 { "HTTP/1.1 410 Gone\n" | 827 { "HTTP/1.1 410 Gone\n" |
823 "\n", | 828 "\n", |
824 false | 829 false |
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2243 std::string headers(tests[i].headers); | 2248 std::string headers(tests[i].headers); |
2244 HeadersToRaw(&headers); | 2249 HeadersToRaw(&headers); |
2245 scoped_refptr<net::HttpResponseHeaders> parsed( | 2250 scoped_refptr<net::HttpResponseHeaders> parsed( |
2246 new net::HttpResponseHeaders(headers)); | 2251 new net::HttpResponseHeaders(headers)); |
2247 net::HttpResponseHeaders::DataReductionProxyInfo chrome_proxy_info; | 2252 net::HttpResponseHeaders::DataReductionProxyInfo chrome_proxy_info; |
2248 EXPECT_EQ(tests[i].expected_result, | 2253 EXPECT_EQ(tests[i].expected_result, |
2249 parsed->GetDataReductionProxyBypassEventType(&chrome_proxy_info)); | 2254 parsed->GetDataReductionProxyBypassEventType(&chrome_proxy_info)); |
2250 } | 2255 } |
2251 } | 2256 } |
2252 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 2257 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
OLD | NEW |