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

Unified Diff: net/base/transport_security_state_unittest.cc

Issue 7818002: net: add HSTS and cert pinning for Tor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/base/transport_security_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/transport_security_state_unittest.cc
diff --git a/net/base/transport_security_state_unittest.cc b/net/base/transport_security_state_unittest.cc
index 0aad72fd73f45f4b77a8cc40325fde28b786d3ec..839a2b868f4ea0bb53282f880cc22f3e6ee2e7bd 100644
--- a/net/base/transport_security_state_unittest.cc
+++ b/net/base/transport_security_state_unittest.cc
@@ -663,6 +663,27 @@ TEST_F(TransportSecurityStateTest, Preloaded) {
EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
"foo.epoxate.com",
false));
+
+ EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
+ "torproject.org",
+ false));
+ EXPECT_TRUE(domain_state.public_key_hashes.size() != 0);
+ EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
+ "www.torproject.org",
+ false));
+ EXPECT_TRUE(domain_state.public_key_hashes.size() != 0);
+ EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
+ "check.torproject.org",
+ false));
+ EXPECT_TRUE(domain_state.public_key_hashes.size() != 0);
+ EXPECT_TRUE(state->IsEnabledForHost(&domain_state,
+ "blog.torproject.org",
+ false));
+ EXPECT_TRUE(domain_state.public_key_hashes.size() != 0);
+
+ EXPECT_FALSE(state->IsEnabledForHost(&domain_state,
+ "foo.torproject.org",
+ false));
}
TEST_F(TransportSecurityStateTest, LongNames) {
« no previous file with comments | « net/base/transport_security_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698