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

Unified Diff: net/http/transport_security_state_unittest.cc

Issue 2906483003: Experiment with a compact mode for simple preloaded entries. (Closed)
Patch Set: Initialize all struct members. Created 3 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
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 fc4e5d4b0a9f8d5489e20548ecb48985e7e02139..242224b01d79f946f9dbbf8447498ea9b6dabf68 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -2438,6 +2438,23 @@ TEST_F(TransportSecurityStateTest, DecodePreloadedMultipleMix) {
EXPECT_TRUE(staple_state.include_subdomains);
EXPECT_EQ(GURL("https://report.badssl.com/staple-upload"),
staple_state.report_uri);
+
+ sts_state = TransportSecurityState::STSState();
+ pkp_state = TransportSecurityState::PKPState();
+ ct_state = TransportSecurityState::ExpectCTState();
+ staple_state = TransportSecurityState::ExpectStapleState();
+
+ // This should be a simple entry in the context of
+ // TrieWriter::IsSimpleEntry().
+ EXPECT_TRUE(GetStaticDomainState(&state, "simple-entry.example.com",
+ &sts_state, &pkp_state));
+ EXPECT_TRUE(sts_state.include_subdomains);
+ EXPECT_EQ(TransportSecurityState::STSState::MODE_FORCE_HTTPS,
+ sts_state.upgrade_mode);
+ EXPECT_FALSE(pkp_state.include_subdomains);
+ EXPECT_FALSE(GetExpectCTState(&state, "simple-entry.example.com", &ct_state));
+ EXPECT_FALSE(
+ GetExpectStapleState(&state, "simple-entry.example.com", &staple_state));
}
static const struct ExpectStapleErrorResponseData {

Powered by Google App Engine
This is Rietveld 408576698