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

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

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/profiles/profile_io_data.cc ('k') | chrome/browser/ssl/cert_verifier_browser_test.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.h
diff --git a/chrome/browser/ssl/cert_verifier_browser_test.h b/chrome/browser/ssl/cert_verifier_browser_test.h
new file mode 100644
index 0000000000000000000000000000000000000000..d5d977ccae9e467d9d22e30855765280bed43e5f
--- /dev/null
+++ b/chrome/browser/ssl/cert_verifier_browser_test.h
@@ -0,0 +1,37 @@
+// 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.
+
+#ifndef CHROME_BROWSER_SSL_CERT_VERIFIER_BROWSER_TEST_H_
+#define CHROME_BROWSER_SSL_CERT_VERIFIER_BROWSER_TEST_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "chrome/test/base/in_process_browser_test.h"
+
+namespace net {
+class MockCertVerifier;
+} // namespace net
+
+// CertVerifierBrowserTest allows tests to force certificate
+// verification results for requests made with any profile's main
+// request context (such as navigations). To do so, tests can use the
+// MockCertVerifier exposed via
+// CertVerifierBrowserTest::mock_cert_verifier().
+class CertVerifierBrowserTest : public InProcessBrowserTest {
+ public:
+ CertVerifierBrowserTest();
+ ~CertVerifierBrowserTest() override;
+
+ // InProcessBrowserTest:
+ void SetUpInProcessBrowserTestFixture() override;
+ void TearDownInProcessBrowserTestFixture() override;
+
+ // Returns a pointer to the MockCertVerifier used by all profiles in
+ // this test.
+ net::MockCertVerifier* mock_cert_verifier();
+
+ private:
+ scoped_ptr<net::MockCertVerifier> mock_cert_verifier_;
+};
+
+#endif // CHROME_BROWSER_SSL_CERT_VERIFIER_BROWSER_TEST_H_
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | chrome/browser/ssl/cert_verifier_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698