summaryrefslogtreecommitdiffstats
path: root/content/browser/ssl/ssl_client_auth_handler_mock.h
blob: 26b63871f7d4fb123fa0608b7199eed6ba98cef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_MOCK_H_
#define CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_MOCK_H_
#pragma once

#include "content/browser/ssl/ssl_client_auth_handler.h"
#include "testing/gmock/include/gmock/gmock.h"

class SSLClientAuthHandlerMock : public SSLClientAuthHandler {
 public:
  SSLClientAuthHandlerMock(
      net::URLRequest* request,
      net::SSLCertRequestInfo* cert_request_info)
      : SSLClientAuthHandler(request, cert_request_info) {
  }
  ~SSLClientAuthHandlerMock() {
    // Hack to avoid destructor calling request_->ContinueWithCertificate.
    OnRequestCancelled();
  }
  MOCK_METHOD1(CertificateSelectedNoNotify, void(net::X509Certificate* cert));
};


#endif  // CONTENT_BROWSER_SSL_SSL_CLIENT_AUTH_HANDLER_MOCK_H_