| 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 #ifndef CHROME_BROWSER_UI_WEBUI_SSL_CLIENT_CERTIFICATE_SELECTOR_WEBUI_BROWSERTES
T_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SSL_CLIENT_CERTIFICATE_SELECTOR_WEBUI_BROWSERTES
T_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SSL_CLIENT_CERTIFICATE_SELECTOR_WEBUI_BROWSERTES
T_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SSL_CLIENT_CERTIFICATE_SELECTOR_WEBUI_BROWSERTES
T_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "chrome/browser/ui/webui/ssl_client_certificate_selector_webui.h" | 10 #include "chrome/browser/ui/webui/ssl_client_certificate_selector_webui.h" |
| 11 #include "chrome/browser/ui/webui/web_ui_browsertest.h" | 11 #include "chrome/browser/ui/webui/web_ui_browsertest.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 class URLRequest; | 14 class URLRequest; |
| 15 class URLRequestContextGetter; | 15 class URLRequestContextGetter; |
| 16 class SSLCertRequestInfo; | 16 class SSLCertRequestInfo; |
| 17 } | 17 } |
| 18 | 18 |
| 19 class SSLClientAuthHandlerMock; | 19 class SSLClientAuthRequestorMock; |
| 20 | 20 |
| 21 namespace testing { | 21 namespace testing { |
| 22 template<class T> class StrictMock; | 22 template<class T> class StrictMock; |
| 23 } | 23 } |
| 24 | 24 |
| 25 // Test framework for the WebUI based edit search engine dialog. | 25 // Test framework for the WebUI based edit search engine dialog. |
| 26 class SSLClientCertificateSelectorUITest : public WebUIBrowserTest { | 26 class SSLClientCertificateSelectorUITest : public WebUIBrowserTest { |
| 27 protected: | 27 protected: |
| 28 SSLClientCertificateSelectorUITest(); | 28 SSLClientCertificateSelectorUITest(); |
| 29 virtual ~SSLClientCertificateSelectorUITest(); | 29 virtual ~SSLClientCertificateSelectorUITest(); |
| 30 | 30 |
| 31 // Displays the SSL client certificate selector for testing. | 31 // Displays the SSL client certificate selector for testing. |
| 32 void ShowSSLClientCertificateSelector(); | 32 void ShowSSLClientCertificateSelector(); |
| 33 | 33 |
| 34 // Releases resources used by the test harness for the SSL client | 34 // Releases resources used by the test harness for the SSL client |
| 35 // certificate. | 35 // certificate. |
| 36 virtual void CleanUpOnMainThread() OVERRIDE; | 36 virtual void CleanUpOnMainThread() OVERRIDE; |
| 37 | 37 |
| 38 // Initializes the URL request on the IO thread. | 38 // Initializes the URL request on the IO thread. |
| 39 void SetUpOnIOThread(); | 39 void SetUpOnIOThread(); |
| 40 | 40 |
| 41 // Releases the URL request on the IO thread. | 41 // Releases the URL request on the IO thread. |
| 42 void CleanUpOnIOThread(); | 42 void CleanUpOnIOThread(); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 base::WaitableEvent io_loop_finished_event_; | 45 base::WaitableEvent io_loop_finished_event_; |
| 46 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; | 46 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
| 47 net::URLRequest* url_request_; | 47 net::URLRequest* url_request_; |
| 48 scoped_refptr<net::SSLCertRequestInfo> cert_request_info_; | 48 scoped_refptr<net::SSLCertRequestInfo> cert_request_info_; |
| 49 scoped_refptr<testing::StrictMock<SSLClientAuthHandlerMock> > | 49 scoped_refptr<testing::StrictMock<SSLClientAuthRequestorMock> > |
| 50 auth_handler_; | 50 auth_requestor_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelectorUITest); | 52 DISALLOW_COPY_AND_ASSIGN(SSLClientCertificateSelectorUITest); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 #endif // CHROME_BROWSER_UI_WEBUI_SSL_CLIENT_CERTIFICATE_SELECTOR_WEBUI_BROWSER
TEST_H_ | 55 #endif // CHROME_BROWSER_UI_WEBUI_SSL_CLIENT_CERTIFICATE_SELECTOR_WEBUI_BROWSER
TEST_H_ |
| OLD | NEW |