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

Unified Diff: chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc

Issue 578553004: Remove the "snionly" concept from the HSTS preload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... Created 6 years, 3 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/net/chrome_fraudulent_certificate_reporter.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc
diff --git a/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc b/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc
index f4134d1d08d537d42556c614a0c734ed38a5439a..ca5464dd135db2757768261a558c7d307fbf58af 100644
--- a/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc
+++ b/chrome/browser/net/chrome_fraudulent_certificate_reporter_unittest.cc
@@ -83,11 +83,9 @@ class SendingTestReporter : public TestReporter {
// Passes if invoked with a good SSLInfo and for a hostname that is a Google
// pinned property.
virtual void SendReport(const std::string& hostname,
- const SSLInfo& ssl_info,
- bool sni_available) OVERRIDE {
+ const SSLInfo& ssl_info) OVERRIDE {
EXPECT_TRUE(IsGoodSSLInfo(ssl_info));
- EXPECT_TRUE(net::TransportSecurityState::IsGooglePinnedProperty(
- hostname, sni_available));
+ EXPECT_TRUE(net::TransportSecurityState::IsGooglePinnedProperty(hostname));
passed_ = true;
}
@@ -108,11 +106,9 @@ class NotSendingTestReporter : public TestReporter {
// Passes if invoked with a bad SSLInfo and for a hostname that is not a
// Google pinned property.
virtual void SendReport(const std::string& hostname,
- const SSLInfo& ssl_info,
- bool sni_available) OVERRIDE {
+ const SSLInfo& ssl_info) OVERRIDE {
EXPECT_FALSE(IsGoodSSLInfo(ssl_info));
- EXPECT_FALSE(net::TransportSecurityState::IsGooglePinnedProperty(
- hostname, sni_available));
+ EXPECT_FALSE(net::TransportSecurityState::IsGooglePinnedProperty(hostname));
}
};
@@ -133,12 +129,10 @@ class MockReporter : public ChromeFraudulentCertificateReporter {
virtual void SendReport(
const std::string& hostname,
- const net::SSLInfo& ssl_info,
- bool sni_available) OVERRIDE {
+ const net::SSLInfo& ssl_info) OVERRIDE {
DCHECK(!hostname.empty());
DCHECK(ssl_info.is_valid());
- ChromeFraudulentCertificateReporter::SendReport(hostname, ssl_info,
- sni_available);
+ ChromeFraudulentCertificateReporter::SendReport(hostname, ssl_info);
}
};
@@ -146,21 +140,21 @@ static void DoReportIsSent() {
net::TestURLRequestContext context;
SendingTestReporter reporter(&context);
SSLInfo info = GetGoodSSLInfo();
- reporter.SendReport("mail.google.com", info, true);
+ reporter.SendReport("mail.google.com", info);
}
static void DoReportIsNotSent() {
net::TestURLRequestContext context;
NotSendingTestReporter reporter(&context);
SSLInfo info = GetBadSSLInfo();
- reporter.SendReport("www.example.com", info, true);
+ reporter.SendReport("www.example.com", info);
}
static void DoMockReportIsSent() {
net::TestURLRequestContext context;
MockReporter reporter(&context);
SSLInfo info = GetGoodSSLInfo();
- reporter.SendReport("mail.google.com", info, true);
+ reporter.SendReport("mail.google.com", info);
}
TEST(ChromeFraudulentCertificateReporterTest, GoodBadInfo) {
« no previous file with comments | « chrome/browser/net/chrome_fraudulent_certificate_reporter.cc ('k') | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698