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

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

Issue 2850033002: Check Expect-CT at connection setup (Closed)
Patch Set: fix comment typo Created 3 years, 7 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/chrome_expect_ct_reporter.cc ('k') | net/http/transport_security_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc
diff --git a/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc b/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc
index 225b8b6ab2cfe57e73a646f43b0f477522161cb9..4f2ca990f13e292fcdf4ef20f72cf4ad87f78a85 100644
--- a/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc
+++ b/chrome/browser/ssl/chrome_expect_ct_reporter_unittest.cc
@@ -325,7 +325,9 @@ class ChromeExpectCTReporterWaitTest : public ::testing::Test {
base::RunLoop run_loop;
network_delegate_.set_url_request_destroyed_callback(
run_loop.QuitClosure());
- reporter->OnExpectCTFailed(host_port, report_uri, ssl_info);
+ reporter->OnExpectCTFailed(host_port, report_uri, ssl_info.cert.get(),
+ ssl_info.unverified_cert.get(),
+ ssl_info.signed_certificate_timestamps);
run_loop.Run();
}
@@ -364,7 +366,9 @@ TEST(ChromeExpectCTReporterTest, FeatureDisabled) {
net::HostPortPair host_port("example.test", 443);
GURL report_uri("http://example-report.test");
- reporter.OnExpectCTFailed(host_port, report_uri, ssl_info);
+ reporter.OnExpectCTFailed(host_port, report_uri, ssl_info.cert.get(),
+ ssl_info.unverified_cert.get(),
+ ssl_info.signed_certificate_timestamps);
EXPECT_TRUE(sender->latest_report_uri().is_empty());
EXPECT_TRUE(sender->latest_serialized_report().empty());
@@ -384,8 +388,8 @@ TEST(ChromeExpectCTReporterTest, EmptyReportURI) {
EXPECT_TRUE(sender->latest_report_uri().is_empty());
EXPECT_TRUE(sender->latest_serialized_report().empty());
- reporter.OnExpectCTFailed(net::HostPortPair("example.test", 443), GURL(),
- net::SSLInfo());
+ reporter.OnExpectCTFailed(net::HostPortPair(), GURL(), nullptr, nullptr,
+ net::SignedCertificateTimestampAndStatusList());
EXPECT_TRUE(sender->latest_report_uri().is_empty());
EXPECT_TRUE(sender->latest_serialized_report().empty());
@@ -483,7 +487,9 @@ TEST(ChromeExpectCTReporterTest, SendReport) {
GURL report_uri("http://example-report.test");
// Check that the report is sent and contains the correct information.
- reporter.OnExpectCTFailed(host_port, report_uri, ssl_info);
+ reporter.OnExpectCTFailed(host_port, report_uri, ssl_info.cert.get(),
+ ssl_info.unverified_cert.get(),
+ ssl_info.signed_certificate_timestamps);
EXPECT_EQ(report_uri, sender->latest_report_uri());
EXPECT_FALSE(sender->latest_serialized_report().empty());
EXPECT_EQ("application/json; charset=utf-8", sender->latest_content_type());
« no previous file with comments | « chrome/browser/ssl/chrome_expect_ct_reporter.cc ('k') | net/http/transport_security_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698