OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/loader/resource_loader.h" | 5 #include "content/browser/loader/resource_loader.h" |
6 | 6 |
7 #include "base/files/file.h" | 7 #include "base/files/file.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 info->ssl_info.connection_status = kTestConnectionStatus; | 220 info->ssl_info.connection_status = kTestConnectionStatus; |
221 } | 221 } |
222 | 222 |
223 private: | 223 private: |
224 ~MockHTTPSURLRequestJob() override {} | 224 ~MockHTTPSURLRequestJob() override {} |
225 | 225 |
226 DISALLOW_COPY_AND_ASSIGN(MockHTTPSURLRequestJob); | 226 DISALLOW_COPY_AND_ASSIGN(MockHTTPSURLRequestJob); |
227 }; | 227 }; |
228 | 228 |
229 const char kRedirectHeaders[] = | 229 const char kRedirectHeaders[] = |
230 "HTTP/1.1 302 Found\0" | 230 "HTTP/1.1 302 Found\n" |
231 "Location: https://example.test\0" | 231 "Location: https://example.test\n" |
232 "\0"; | 232 "\n"; |
233 | 233 |
234 class MockHTTPSJobURLRequestInterceptor : public net::URLRequestInterceptor { | 234 class MockHTTPSJobURLRequestInterceptor : public net::URLRequestInterceptor { |
235 public: | 235 public: |
236 MockHTTPSJobURLRequestInterceptor(bool redirect) : redirect_(redirect) {} | 236 MockHTTPSJobURLRequestInterceptor(bool redirect) : redirect_(redirect) {} |
237 ~MockHTTPSJobURLRequestInterceptor() override {} | 237 ~MockHTTPSJobURLRequestInterceptor() override {} |
238 | 238 |
239 // net::URLRequestInterceptor: | 239 // net::URLRequestInterceptor: |
240 net::URLRequestJob* MaybeInterceptRequest( | 240 net::URLRequestJob* MaybeInterceptRequest( |
241 net::URLRequest* request, | 241 net::URLRequest* request, |
242 net::NetworkDelegate* network_delegate) const override { | 242 net::NetworkDelegate* network_delegate) const override { |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 ASSERT_TRUE( | 1139 ASSERT_TRUE( |
1140 CertStore::GetInstance()->RetrieveCert(deserialized.cert_id, &cert)); | 1140 CertStore::GetInstance()->RetrieveCert(deserialized.cert_id, &cert)); |
1141 EXPECT_TRUE(cert->Equals(GetTestCert().get())); | 1141 EXPECT_TRUE(cert->Equals(GetTestCert().get())); |
1142 | 1142 |
1143 EXPECT_EQ(kTestCertError, deserialized.cert_status); | 1143 EXPECT_EQ(kTestCertError, deserialized.cert_status); |
1144 EXPECT_EQ(kTestConnectionStatus, deserialized.connection_status); | 1144 EXPECT_EQ(kTestConnectionStatus, deserialized.connection_status); |
1145 EXPECT_EQ(kTestSecurityBits, deserialized.security_bits); | 1145 EXPECT_EQ(kTestSecurityBits, deserialized.security_bits); |
1146 } | 1146 } |
1147 | 1147 |
1148 } // namespace content | 1148 } // namespace content |
OLD | NEW |