1 // Copyright 2015 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 NET_TEST_URL_REQUEST_SSL_CERTIFICATE_ERROR_JOB_H_
6 #define NET_TEST_URL_REQUEST_SSL_CERTIFICATE_ERROR_JOB_H_
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "net/url_request/url_request_job.h"
15 class NetworkDelegate
;
18 // SSLCertificateErrorJob simulates a ERR_CERT_DATE_INVALID error.
19 class SSLCertificateErrorJob
: public URLRequestJob
{
21 SSLCertificateErrorJob(URLRequest
* request
,
22 NetworkDelegate
* network_delegate
);
24 // URLRequestJob implementation:
25 void Start() override
;
27 // Adds the testing URLs to the URLRequestFilter.
28 static void AddUrlHandler();
30 static GURL
GetMockUrl();
33 ~SSLCertificateErrorJob() override
;
37 base::WeakPtrFactory
<SSLCertificateErrorJob
> weak_factory_
;
39 DISALLOW_COPY_AND_ASSIGN(SSLCertificateErrorJob
);
44 #endif // NET_TEST_URL_REQUEST_SSL_CERTIFICATE_ERROR_JOB_H_