Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Unified Diff: content/browser/loader/resource_loader_unittest.cc

Issue 2926463002: Fix TransportSecurityState unittests to run in --single-process mode. (Closed)
Patch Set: Fixup model tests Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/certificate_reporting/error_report_unittest.cc ('k') | net/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/resource_loader_unittest.cc
diff --git a/content/browser/loader/resource_loader_unittest.cc b/content/browser/loader/resource_loader_unittest.cc
index ff068e7a74036bb4bc3a7f589818649156062b22..715b4818fcbe8e609b91aa86cb54793a2cfea86a 100644
--- a/content/browser/loader/resource_loader_unittest.cc
+++ b/content/browser/loader/resource_loader_unittest.cc
@@ -194,11 +194,6 @@ class MockClientCertJobProtocolHandler
// Set up dummy values to use in test HTTPS requests.
-scoped_refptr<net::X509Certificate> GetTestCert() {
- return net::ImportCertFromFile(net::GetTestCertsDirectory(),
- "test_mail_google_com.pem");
-}
-
const net::CertStatus kTestCertError = net::CERT_STATUS_DATE_INVALID;
const int kTestSecurityBits = 256;
// SSL3 TLS_DHE_RSA_WITH_AES_256_CBC_SHA
@@ -222,7 +217,8 @@ class MockHTTPSURLRequestJob : public net::URLRequestTestJob {
void GetResponseInfo(net::HttpResponseInfo* info) override {
// Get the original response info, but override the SSL info.
net::URLRequestJob::GetResponseInfo(info);
- info->ssl_info.cert = GetTestCert();
+ info->ssl_info.cert =
+ net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem");
info->ssl_info.cert_status = kTestCertError;
info->ssl_info.security_bits = kTestSecurityBits;
info->ssl_info.connection_status = kTestConnectionStatus;
@@ -599,7 +595,8 @@ TEST_F(ClientCertResourceLoaderTest, WithStoreLookup) {
// Set up the test client cert store.
int store_request_count;
std::vector<std::string> store_requested_authorities;
- net::CertificateList dummy_certs(1, GetTestCert());
+ net::CertificateList dummy_certs(
+ 1, net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem"));
std::unique_ptr<ClientCertStoreStub> test_store(new ClientCertStoreStub(
dummy_certs, &store_request_count, &store_requested_authorities));
SetClientCertStore(std::move(test_store));
« no previous file with comments | « components/certificate_reporting/error_report_unittest.cc ('k') | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698