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

Unified Diff: net/http/transport_security_state_unittest.cc

Issue 16261002: Preload HSTS for paypal.com. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests. Created 7 years, 6 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 | « net/http/transport_security_state_static.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/transport_security_state_unittest.cc
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc
index 65a187bf77baf9f4028eb4bf8d29c17496b0c104..465c3403bf7dc9fa61d4abebbcd2b894ce81934a 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -151,6 +151,7 @@ TEST_F(TransportSecurityStateTest, DeleteDynamicDataForHost) {
TEST_F(TransportSecurityStateTest, IsPreloaded) {
const std::string paypal = CanonicalizeHost("paypal.com");
const std::string www_paypal = CanonicalizeHost("www.paypal.com");
+ const std::string foo_paypal = CanonicalizeHost("foo.paypal.com");
const std::string a_www_paypal = CanonicalizeHost("a.www.paypal.com");
const std::string abc_paypal = CanonicalizeHost("a.b.c.paypal.com");
const std::string example = CanonicalizeHost("example.com");
@@ -159,8 +160,9 @@ TEST_F(TransportSecurityStateTest, IsPreloaded) {
TransportSecurityState state;
TransportSecurityState::DomainState domain_state;
- EXPECT_FALSE(GetStaticDomainState(&state, paypal, true, &domain_state));
+ EXPECT_TRUE(GetStaticDomainState(&state, paypal, true, &domain_state));
EXPECT_TRUE(GetStaticDomainState(&state, www_paypal, true, &domain_state));
+ EXPECT_FALSE(GetStaticDomainState(&state, foo_paypal, true, &domain_state));
EXPECT_FALSE(domain_state.include_subdomains);
EXPECT_FALSE(GetStaticDomainState(&state, a_www_paypal, true, &domain_state));
EXPECT_FALSE(GetStaticDomainState(&state, abc_paypal, true, &domain_state));
@@ -229,7 +231,7 @@ TEST_F(TransportSecurityStateTest, Preloaded) {
TransportSecurityState::DomainState::MODE_FORCE_HTTPS);
EXPECT_FALSE(domain_state.include_subdomains);
- EXPECT_FALSE(HasState("paypal.com"));
+ EXPECT_TRUE(HasState("paypal.com"));
EXPECT_FALSE(HasState("www2.paypal.com"));
EXPECT_FALSE(HasState("www2.paypal.com"));
« no previous file with comments | « net/http/transport_security_state_static.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698