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/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "content/browser/browser_thread_impl.h" | 8 #include "content/browser/browser_thread_impl.h" |
9 #include "content/browser/loader/resource_loader_delegate.h" | 9 #include "content/browser/loader/resource_loader_delegate.h" |
10 #include "content/public/browser/resource_request_info.h" | 10 #include "content/public/browser/resource_request_info.h" |
11 #include "content/public/test/mock_resource_context.h" | 11 #include "content/public/test/mock_resource_context.h" |
12 #include "content/test/test_content_browser_client.h" | 12 #include "content/test/test_content_browser_client.h" |
13 #include "net/base/client_cert_store.h" | 13 #include "net/base/client_cert_store.h" |
14 #include "net/base/ssl_cert_request_info.h" | |
15 #include "net/base/x509_certificate.h" | 14 #include "net/base/x509_certificate.h" |
| 15 #include "net/ssl/ssl_cert_request_info.h" |
16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Stub client certificate store that returns a preset list of certificates for | 22 // Stub client certificate store that returns a preset list of certificates for |
23 // each request and records the arguments of the most recent request for later | 23 // each request and records the arguments of the most recent request for later |
24 // inspection. | 24 // inspection. |
25 class ClientCertStoreStub : public net::ClientCertStore { | 25 class ClientCertStoreStub : public net::ClientCertStore { |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 EXPECT_EQ(dummy_authority, raw_ptr_to_store->requested_authorities()); | 247 EXPECT_EQ(dummy_authority, raw_ptr_to_store->requested_authorities()); |
248 | 248 |
249 // Check if the retrieved certificates were passed to the content browser | 249 // Check if the retrieved certificates were passed to the content browser |
250 // client. | 250 // client. |
251 EXPECT_EQ(1, test_client.call_count()); | 251 EXPECT_EQ(1, test_client.call_count()); |
252 EXPECT_EQ(dummy_certs, test_client.passed_certs()); | 252 EXPECT_EQ(dummy_certs, test_client.passed_certs()); |
253 } | 253 } |
254 #endif // !defined(OPENSSL) | 254 #endif // !defined(OPENSSL) |
255 | 255 |
256 } // namespace content | 256 } // namespace content |
OLD | NEW |