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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
7 #include "base/synchronization/waitable_event.h" | 7 #include "base/synchronization/waitable_event.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ssl/ssl_client_auth_requestor_mock.h" | 9 #include "chrome/browser/ssl/ssl_client_auth_requestor_mock.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 virtual void CleanUpOnIOThread() { | 119 virtual void CleanUpOnIOThread() { |
120 delete url_request_; | 120 delete url_request_; |
121 | 121 |
122 io_loop_finished_event_.Signal(); | 122 io_loop_finished_event_.Signal(); |
123 } | 123 } |
124 | 124 |
125 protected: | 125 protected: |
126 scoped_ptr<net::URLRequest> MakeURLRequest( | 126 scoped_ptr<net::URLRequest> MakeURLRequest( |
127 net::URLRequestContextGetter* context_getter) { | 127 net::URLRequestContextGetter* context_getter) { |
128 return context_getter->GetURLRequestContext()->CreateRequest( | 128 return context_getter->GetURLRequestContext()->CreateRequest( |
129 GURL("https://example"), net::DEFAULT_PRIORITY, NULL, NULL); | 129 GURL("https://example"), net::DEFAULT_PRIORITY, NULL); |
130 } | 130 } |
131 | 131 |
132 base::WaitableEvent io_loop_finished_event_; | 132 base::WaitableEvent io_loop_finished_event_; |
133 | 133 |
134 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; | 134 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
135 net::URLRequest* url_request_; | 135 net::URLRequest* url_request_; |
136 | 136 |
137 scoped_refptr<net::X509Certificate> client_cert_1_; | 137 scoped_refptr<net::X509Certificate> client_cert_1_; |
138 scoped_refptr<net::X509Certificate> client_cert_2_; | 138 scoped_refptr<net::X509Certificate> client_cert_2_; |
139 scoped_refptr<net::SSLCertRequestInfo> cert_request_info_; | 139 scoped_refptr<net::SSLCertRequestInfo> cert_request_info_; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 EXPECT_TRUE(ui_test_utils::SendKeyPressSync( | 392 EXPECT_TRUE(ui_test_utils::SendKeyPressSync( |
393 browser_1_, ui::VKEY_RETURN, false, false, false, false)); | 393 browser_1_, ui::VKEY_RETURN, false, false, false, false)); |
394 | 394 |
395 Mock::VerifyAndClear(auth_requestor_.get()); | 395 Mock::VerifyAndClear(auth_requestor_.get()); |
396 Mock::VerifyAndClear(auth_requestor_1_.get()); | 396 Mock::VerifyAndClear(auth_requestor_1_.get()); |
397 | 397 |
398 // Now let the default selection for auth_requestor_ mock get checked on | 398 // Now let the default selection for auth_requestor_ mock get checked on |
399 // destruction. | 399 // destruction. |
400 EXPECT_CALL(*auth_requestor_.get(), CancelCertificateSelection()); | 400 EXPECT_CALL(*auth_requestor_.get(), CancelCertificateSelection()); |
401 } | 401 } |
OLD | NEW |