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

Unified Diff: chrome/browser/ssl/cert_verifier_browser_test.cc

Issue 1227943002: Allow browser tests to use a MockCertVerifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: put the files in the right .gypi Created 5 years, 4 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 | « chrome/browser/ssl/cert_verifier_browser_test.h ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/cert_verifier_browser_test.cc
diff --git a/chrome/browser/ssl/cert_verifier_browser_test.cc b/chrome/browser/ssl/cert_verifier_browser_test.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5ec31c36acaa5606c5a3ccf113ad47a1d20faa3e
--- /dev/null
+++ b/chrome/browser/ssl/cert_verifier_browser_test.cc
@@ -0,0 +1,26 @@
+// Copyright 2015 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.
+
+#include "chrome/browser/ssl/cert_verifier_browser_test.h"
+
+#include "chrome/browser/profiles/profile_io_data.h"
+#include "net/cert/mock_cert_verifier.h"
+
+CertVerifierBrowserTest::CertVerifierBrowserTest()
+ : InProcessBrowserTest(),
+ mock_cert_verifier_(new net::MockCertVerifier()) {}
+
+CertVerifierBrowserTest::~CertVerifierBrowserTest() {}
+
+void CertVerifierBrowserTest::SetUpInProcessBrowserTestFixture() {
+ ProfileIOData::SetCertVerifierForTesting(mock_cert_verifier_.get());
+}
+
+void CertVerifierBrowserTest::TearDownInProcessBrowserTestFixture() {
+ ProfileIOData::SetCertVerifierForTesting(nullptr);
+}
+
+net::MockCertVerifier* CertVerifierBrowserTest::mock_cert_verifier() {
+ return mock_cert_verifier_.get();
+}
« no previous file with comments | « chrome/browser/ssl/cert_verifier_browser_test.h ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698