| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <deque> | 6 #include <deque> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #include "content/public/test/test_navigation_observer.h" | 107 #include "content/public/test/test_navigation_observer.h" |
| 108 #include "content/public/test/test_utils.h" | 108 #include "content/public/test/test_utils.h" |
| 109 #include "extensions/common/constants.h" | 109 #include "extensions/common/constants.h" |
| 110 #include "extensions/common/extension_urls.h" | 110 #include "extensions/common/extension_urls.h" |
| 111 #include "extensions/common/manifest_handlers/mime_types_handler.h" | 111 #include "extensions/common/manifest_handlers/mime_types_handler.h" |
| 112 #include "extensions/common/switches.h" | 112 #include "extensions/common/switches.h" |
| 113 #include "extensions/test/result_catcher.h" | 113 #include "extensions/test/result_catcher.h" |
| 114 #include "net/base/escape.h" | 114 #include "net/base/escape.h" |
| 115 #include "net/cert/x509_certificate.h" | 115 #include "net/cert/x509_certificate.h" |
| 116 #include "net/dns/mock_host_resolver.h" | 116 #include "net/dns/mock_host_resolver.h" |
| 117 #include "net/ssl/client_cert_identity_test_util.h" |
| 117 #include "net/ssl/client_cert_store.h" | 118 #include "net/ssl/client_cert_store.h" |
| 118 #include "net/ssl/ssl_cert_request_info.h" | 119 #include "net/ssl/ssl_cert_request_info.h" |
| 119 #include "net/ssl/ssl_server_config.h" | 120 #include "net/ssl/ssl_server_config.h" |
| 120 #include "net/test/cert_test_util.h" | 121 #include "net/test/cert_test_util.h" |
| 121 #include "net/test/embedded_test_server/embedded_test_server.h" | 122 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 122 #include "net/test/embedded_test_server/request_handler_util.h" | 123 #include "net/test/embedded_test_server/request_handler_util.h" |
| 123 #include "net/test/test_data_directory.h" | 124 #include "net/test/test_data_directory.h" |
| 124 #include "net/url_request/url_request_context.h" | 125 #include "net/url_request/url_request_context.h" |
| 125 #include "net/url_request/url_request_context_getter.h" | 126 #include "net/url_request/url_request_context_getter.h" |
| 126 #include "net/url_request/url_request_filter.h" | 127 #include "net/url_request/url_request_filter.h" |
| (...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2250 | 2251 |
| 2251 class TestClientCertStore : public net::ClientCertStore { | 2252 class TestClientCertStore : public net::ClientCertStore { |
| 2252 public: | 2253 public: |
| 2253 explicit TestClientCertStore(const net::CertificateList& certs) | 2254 explicit TestClientCertStore(const net::CertificateList& certs) |
| 2254 : certs_(certs) {} | 2255 : certs_(certs) {} |
| 2255 ~TestClientCertStore() override {} | 2256 ~TestClientCertStore() override {} |
| 2256 | 2257 |
| 2257 // net::ClientCertStore: | 2258 // net::ClientCertStore: |
| 2258 void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info, | 2259 void GetClientCerts(const net::SSLCertRequestInfo& cert_request_info, |
| 2259 const ClientCertListCallback& callback) override { | 2260 const ClientCertListCallback& callback) override { |
| 2260 callback.Run(certs_); | 2261 callback.Run(FakeClientCertIdentityListFromCertificateList(certs_)); |
| 2261 } | 2262 } |
| 2262 | 2263 |
| 2263 private: | 2264 private: |
| 2264 net::CertificateList certs_; | 2265 net::CertificateList certs_; |
| 2265 }; | 2266 }; |
| 2266 | 2267 |
| 2267 std::unique_ptr<net::ClientCertStore> CreateCertStore( | 2268 std::unique_ptr<net::ClientCertStore> CreateCertStore( |
| 2268 scoped_refptr<net::X509Certificate> available_cert) { | 2269 scoped_refptr<net::X509Certificate> available_cert) { |
| 2269 return std::unique_ptr<net::ClientCertStore>( | 2270 return std::unique_ptr<net::ClientCertStore>( |
| 2270 new TestClientCertStore(net::CertificateList(1, available_cert))); | 2271 new TestClientCertStore(net::CertificateList(1, available_cert))); |
| (...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3928 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, | 3929 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(web_contents, |
| 3929 "DidDisplayReallyPass()", | 3930 "DidDisplayReallyPass()", |
| 3930 &display_test_result)); | 3931 &display_test_result)); |
| 3931 ASSERT_TRUE(display_test_result); | 3932 ASSERT_TRUE(display_test_result); |
| 3932 } | 3933 } |
| 3933 #endif // !defined(DISABLE_NACL) | 3934 #endif // !defined(DISABLE_NACL) |
| 3934 | 3935 |
| 3935 } // namespace prerender | 3936 } // namespace prerender |
| 3936 | 3937 |
| 3937 #endif // !defined(OS_MACOSX) || !defined(ADDRESS_SANITIZER) | 3938 #endif // !defined(OS_MACOSX) || !defined(ADDRESS_SANITIZER) |
| OLD | NEW |