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 "chrome/browser/ssl/ssl_client_certificate_selector_test.h" | 5 #include "chrome/browser/ssl/ssl_client_certificate_selector_test.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 mit_davidben_cert_ = net::ImportCertFromFile(certs_dir, "mit.davidben.der"); | 38 mit_davidben_cert_ = net::ImportCertFromFile(certs_dir, "mit.davidben.der"); |
39 ASSERT_TRUE(mit_davidben_cert_); | 39 ASSERT_TRUE(mit_davidben_cert_); |
40 | 40 |
41 foaf_me_chromium_test_cert_ = net::ImportCertFromFile( | 41 foaf_me_chromium_test_cert_ = net::ImportCertFromFile( |
42 certs_dir, "foaf.me.chromium-test-cert.der"); | 42 certs_dir, "foaf.me.chromium-test-cert.der"); |
43 ASSERT_TRUE(foaf_me_chromium_test_cert_); | 43 ASSERT_TRUE(foaf_me_chromium_test_cert_); |
44 | 44 |
45 cert_request_info_ = new net::SSLCertRequestInfo; | 45 cert_request_info_ = new net::SSLCertRequestInfo; |
46 cert_request_info_->host_and_port = "foo:123"; | 46 cert_request_info_->host_and_port = "foo:123"; |
| 47 cert_request_info_->no_client_certs = false; |
47 cert_request_info_->client_certs.push_back(mit_davidben_cert_); | 48 cert_request_info_->client_certs.push_back(mit_davidben_cert_); |
48 cert_request_info_->client_certs.push_back(foaf_me_chromium_test_cert_); | 49 cert_request_info_->client_certs.push_back(foaf_me_chromium_test_cert_); |
49 } | 50 } |
50 | 51 |
51 void SSLClientCertificateSelectorTestBase::SetUpOnMainThread() { | 52 void SSLClientCertificateSelectorTestBase::SetUpOnMainThread() { |
52 url_request_context_getter_ = browser()->profile()->GetRequestContext(); | 53 url_request_context_getter_ = browser()->profile()->GetRequestContext(); |
53 | 54 |
54 BrowserThread::PostTask( | 55 BrowserThread::PostTask( |
55 BrowserThread::IO, | 56 BrowserThread::IO, |
56 FROM_HERE, | 57 FROM_HERE, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 io_loop_finished_event_.Signal(); | 94 io_loop_finished_event_.Signal(); |
94 } | 95 } |
95 | 96 |
96 net::URLRequest* SSLClientCertificateSelectorTestBase::MakeURLRequest( | 97 net::URLRequest* SSLClientCertificateSelectorTestBase::MakeURLRequest( |
97 net::URLRequestContextGetter* context_getter) { | 98 net::URLRequestContextGetter* context_getter) { |
98 net::URLRequest* request = | 99 net::URLRequest* request = |
99 context_getter->GetURLRequestContext()->CreateRequest( | 100 context_getter->GetURLRequestContext()->CreateRequest( |
100 GURL("https://example"), NULL); | 101 GURL("https://example"), NULL); |
101 return request; | 102 return request; |
102 } | 103 } |
OLD | NEW |