| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 private: | 733 private: |
| 734 const GURL test_https_url_; | 734 const GURL test_https_url_; |
| 735 const GURL test_https_redirect_url_; | 735 const GURL test_https_redirect_url_; |
| 736 }; | 736 }; |
| 737 | 737 |
| 738 // Tests that client certificates are requested with ClientCertStore lookup. | 738 // Tests that client certificates are requested with ClientCertStore lookup. |
| 739 TEST_F(ClientCertResourceLoaderTest, WithStoreLookup) { | 739 TEST_F(ClientCertResourceLoaderTest, WithStoreLookup) { |
| 740 // Set up the test client cert store. | 740 // Set up the test client cert store. |
| 741 int store_request_count; | 741 int store_request_count; |
| 742 std::vector<std::string> store_requested_authorities; | 742 std::vector<std::string> store_requested_authorities; |
| 743 net::CertificateList dummy_certs(1, scoped_refptr<net::X509Certificate>( | 743 net::CertificateList dummy_certs(1, GetTestCert()); |
| 744 new net::X509Certificate("test", "test", base::Time(), base::Time()))); | |
| 745 std::unique_ptr<ClientCertStoreStub> test_store(new ClientCertStoreStub( | 744 std::unique_ptr<ClientCertStoreStub> test_store(new ClientCertStoreStub( |
| 746 dummy_certs, &store_request_count, &store_requested_authorities)); | 745 dummy_certs, &store_request_count, &store_requested_authorities)); |
| 747 resource_context_.SetClientCertStore(std::move(test_store)); | 746 resource_context_.SetClientCertStore(std::move(test_store)); |
| 748 | 747 |
| 749 // Plug in test content browser client. | 748 // Plug in test content browser client. |
| 750 SelectCertificateBrowserClient test_client; | 749 SelectCertificateBrowserClient test_client; |
| 751 ContentBrowserClient* old_client = SetBrowserClientForTesting(&test_client); | 750 ContentBrowserClient* old_client = SetBrowserClientForTesting(&test_client); |
| 752 | 751 |
| 753 // Start the request and wait for it to pause. | 752 // Start the request and wait for it to pause. |
| 754 loader_->StartRequest(); | 753 loader_->StartRequest(); |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 | 1242 |
| 1244 // Tests that the effective connection type is not set on non-main frame | 1243 // Tests that the effective connection type is not set on non-main frame |
| 1245 // requests. | 1244 // requests. |
| 1246 TEST_F(EffectiveConnectionTypeResourceLoaderTest, NotAMainFrame) { | 1245 TEST_F(EffectiveConnectionTypeResourceLoaderTest, NotAMainFrame) { |
| 1247 VerifyEffectiveConnectionType( | 1246 VerifyEffectiveConnectionType( |
| 1248 false, net::NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G, | 1247 false, net::NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_3G, |
| 1249 net::NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_UNKNOWN); | 1248 net::NetworkQualityEstimator::EFFECTIVE_CONNECTION_TYPE_UNKNOWN); |
| 1250 } | 1249 } |
| 1251 | 1250 |
| 1252 } // namespace content | 1251 } // namespace content |
| OLD | NEW |