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

Unified Diff: net/base/transport_security_state_unittest.cc

Issue 6869043: Add command-line control of the HSTS preload list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 8 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
Index: net/base/transport_security_state_unittest.cc
===================================================================
--- net/base/transport_security_state_unittest.cc (revision 81709)
+++ net/base/transport_security_state_unittest.cc (working copy)
@@ -336,14 +336,20 @@
const std::string aypal =
TransportSecurityState::CanonicalizeHost("aypal.com");
- bool b;
- EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(paypal, true, &b));
- EXPECT_TRUE(TransportSecurityState::IsPreloadedSTS(www_paypal, true, &b));
- EXPECT_FALSE(b);
- EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(a_www_paypal, true, &b));
- EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(abc_paypal, true, &b));
- EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(example, true, &b));
- EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(aypal, true, &b));
+ TransportSecurityState::DomainState domain_state;
+ EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(
+ paypal, true, &domain_state));
+ EXPECT_TRUE(TransportSecurityState::IsPreloadedSTS(
+ www_paypal, true, &domain_state));
+ EXPECT_FALSE(domain_state.include_subdomains);
+ EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(
+ a_www_paypal, true, &domain_state));
+ EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(
+ abc_paypal, true, &domain_state));
+ EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(
+ example, true, &domain_state));
+ EXPECT_FALSE(TransportSecurityState::IsPreloadedSTS(
+ aypal, true, &domain_state));
}
TEST_F(TransportSecurityStateTest, Preloaded) {
« net/base/transport_security_state.cc ('K') | « net/base/transport_security_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698