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 599bfb2b92c08e11327e6f50e4d17d671f6a2618..3d7d88f66ac40e97fa11c926b4763fab783e8e17 100644 |
--- a/net/http/transport_security_state_unittest.cc |
+++ b/net/http/transport_security_state_unittest.cc |
@@ -234,6 +234,17 @@ static bool OnlyPinning(const char *hostname) { |
!domain_state.ShouldUpgradeToSSL(); |
} |
+TEST_F(TransportSecurityStateTest, NoClobberPins) { |
+ TransportSecurityState state; |
+ TransportSecurityState::DomainState domain_state; |
+ |
+ EXPECT_TRUE(state.GetDomainState("accounts.google.com", true, &domain_state)); |
+ EXPECT_TRUE(HasPublicKeyPins("accounts.google.com")); |
+ EXPECT_TRUE(state.AddHSTSHeader("accounts.google.com", |
+ "includesubdomains; max-age=1000000")); |
+ EXPECT_TRUE(HasPublicKeyPins("accounts.google.com")); |
+} |
+ |
TEST_F(TransportSecurityStateTest, Preloaded) { |
TransportSecurityState state; |
TransportSecurityState::DomainState domain_state; |