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

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

Issue 2540853005: Test interstitials shouldn't use null SSLCertReporters (Closed)
Patch Set: Fix the checks Created 4 years 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_report_helper.cc ('k') | chrome/browser/ui/webui/interstitials/interstitial_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_browser_tests.cc
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 4be805da46bbe5f517cee46a378665d9cf096291..4a61a3b85741f4a890f030b0f3debe8abbf5b3c2 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -3668,6 +3668,13 @@ IN_PROC_BROWSER_TEST_F(CommonNameMismatchBrowserTest,
EXPECT_FALSE(contents->IsLoading());
}
+class FakeSSLCertReporter : public SSLCertReporter {
+ public:
+ // SSLCertReporter methods:
+ void ReportInvalidCertificateChain(
+ const std::string& serialized_report) override {}
+};
+
class SSLBlockingPageIDNTest : public SecurityInterstitialIDNTest {
protected:
// SecurityInterstitialIDNTest implementation
@@ -3679,7 +3686,8 @@ class SSLBlockingPageIDNTest : public SecurityInterstitialIDNTest {
net::ImportCertFromFile(net::GetTestCertsDirectory(), "ok_cert.pem");
return SSLBlockingPage::Create(
contents, net::ERR_CERT_CONTAINS_ERRORS, ssl_info, request_url, 0,
- base::Time::NowFromSystemTime(), nullptr,
+ base::Time::NowFromSystemTime(),
+ std::unique_ptr<SSLCertReporter>(new FakeSSLCertReporter()),
base::Callback<void(content::CertificateRequestResultType)>());
}
};
« no previous file with comments | « chrome/browser/ssl/cert_report_helper.cc ('k') | chrome/browser/ui/webui/interstitials/interstitial_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698