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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_REQUESTOR_MOCK_H_
6 #define CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_REQUESTOR_MOCK_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "testing/gmock/include/gmock/gmock.h"
13 class ClientCertificateDelegate
;
17 class HttpNetworkSession
;
18 class SSLCertRequestInfo
;
20 class X509Certificate
;
23 class SSLClientAuthRequestorMock
24 : public base::RefCountedThreadSafe
<SSLClientAuthRequestorMock
> {
26 SSLClientAuthRequestorMock(
27 net::URLRequest
* request
,
28 const scoped_refptr
<net::SSLCertRequestInfo
>& cert_request_info
);
30 scoped_ptr
<content::ClientCertificateDelegate
> CreateDelegate();
32 MOCK_METHOD1(CertificateSelected
, void(net::X509Certificate
* cert
));
33 MOCK_METHOD0(CancelCertificateSelection
, void());
35 scoped_refptr
<net::SSLCertRequestInfo
> cert_request_info_
;
38 friend class base::RefCountedThreadSafe
<SSLClientAuthRequestorMock
>;
39 virtual ~SSLClientAuthRequestorMock();
42 #endif // CHROME_BROWSER_SSL_SSL_CLIENT_AUTH_REQUESTOR_MOCK_H_