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> |
11 #include <limits> | 11 #include <limits> |
12 #include <memory> | 12 #include <memory> |
13 | 13 |
14 #include "base/pickle.h" | 14 #include "base/pickle.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "net/http/http_byte_range.h" | 17 #include "net/http/http_byte_range.h" |
| 18 #include "net/log/net_log_capture_mode.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
19 | 20 |
20 namespace net { | 21 namespace net { |
21 | 22 |
22 namespace { | 23 namespace { |
23 | 24 |
24 struct TestData { | 25 struct TestData { |
25 const char* raw_headers; | 26 const char* raw_headers; |
26 const char* expected_headers; | 27 const char* expected_headers; |
27 HttpVersion expected_version; | 28 HttpVersion expected_version; |
(...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2214 TEST_F(HttpResponseHeadersCacheControlTest, | 2215 TEST_F(HttpResponseHeadersCacheControlTest, |
2215 FirstStaleWhileRevalidateValueUsed) { | 2216 FirstStaleWhileRevalidateValueUsed) { |
2216 InitializeHeadersWithCacheControl( | 2217 InitializeHeadersWithCacheControl( |
2217 "stale-while-revalidate=1,stale-while-revalidate=7200"); | 2218 "stale-while-revalidate=1,stale-while-revalidate=7200"); |
2218 EXPECT_EQ(TimeDelta::FromSeconds(1), GetStaleWhileRevalidateValue()); | 2219 EXPECT_EQ(TimeDelta::FromSeconds(1), GetStaleWhileRevalidateValue()); |
2219 } | 2220 } |
2220 | 2221 |
2221 } // namespace | 2222 } // namespace |
2222 | 2223 |
2223 } // namespace net | 2224 } // namespace net |
OLD | NEW |