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

Unified Diff: net/http/transport_security_state_unittest.cc

Issue 2176183003: Revert of Enable Expect-Staple in SSLClientSocket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ocsp-reporting
Patch Set: Created 4 years, 5 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.cc ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | 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 1684b7b2f8b0717c13da97fb5282fdb39c339448..ac97e5d5bcf239dcc110d0ccccfa77f65ec8a8e2 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -364,9 +364,8 @@
state->enable_static_expect_ct_ = true;
}
- static void SetEnableStaticExpectStaple(TransportSecurityState* state,
- bool enabled) {
- state->enable_static_expect_staple_ = enabled;
+ static void EnableStaticExpectStaple(TransportSecurityState* state) {
+ state->enable_static_expect_staple_ = true;
}
static HashValueVector GetSampleSPKIHashes() {
@@ -1842,10 +1841,9 @@
TEST_F(TransportSecurityStateTest, PreloadedExpectStaple) {
TransportSecurityState state;
TransportSecurityState::ExpectStapleState expect_staple_state;
- TransportSecurityStateTest::SetEnableStaticExpectStaple(&state, false);
EXPECT_FALSE(GetExpectStapleState(&state, kExpectStapleStaticHostname,
&expect_staple_state));
- TransportSecurityStateTest::SetEnableStaticExpectStaple(&state, true);
+ TransportSecurityStateTest::EnableStaticExpectStaple(&state);
EXPECT_TRUE(GetExpectStapleState(&state, kExpectStapleStaticHostname,
&expect_staple_state));
EXPECT_EQ(kExpectStapleStaticHostname, expect_staple_state.domain);
@@ -1860,7 +1858,7 @@
TEST_F(TransportSecurityStateTest, PreloadedExpectStapleIncludeSubdomains) {
TransportSecurityState state;
- TransportSecurityStateTest::SetEnableStaticExpectStaple(&state, true);
+ TransportSecurityStateTest::EnableStaticExpectStaple(&state);
TransportSecurityState::ExpectStapleState expect_staple_state;
std::string subdomain = "subdomain.";
subdomain += kExpectStapleStaticIncludeSubdomainsHostname;
@@ -2030,7 +2028,7 @@
// serialized correctly.
TEST_P(ExpectStapleErrorResponseTest, CheckResponseStatusSerialization) {
TransportSecurityState state;
- TransportSecurityStateTest::SetEnableStaticExpectStaple(&state, true);
+ TransportSecurityStateTest::EnableStaticExpectStaple(&state);
MockCertificateReportSender reporter;
ExpectStapleErrorResponseData test = GetParam();
@@ -2085,7 +2083,7 @@
// |revocation_status| != GOOD.
TEST_P(ExpectStapleErrorCertStatusTest, CheckCertStatusSerialization) {
TransportSecurityState state;
- TransportSecurityStateTest::SetEnableStaticExpectStaple(&state, true);
+ TransportSecurityStateTest::EnableStaticExpectStaple(&state);
MockCertificateReportSender reporter;
ExpectStapleErrorCertStatusData test = GetParam();
std::string ocsp_response = "dummy_response";
@@ -2125,7 +2123,7 @@
TEST_F(TransportSecurityStateTest, ExpectStapleDoesNotReportValidStaple) {
TransportSecurityState state;
- TransportSecurityStateTest::SetEnableStaticExpectStaple(&state, true);
+ TransportSecurityStateTest::EnableStaticExpectStaple(&state);
MockCertificateReportSender reporter;
state.SetReportSender(&reporter);
@@ -2160,7 +2158,7 @@
TEST_F(TransportSecurityStateTest, ExpectStapleRequiresPreload) {
TransportSecurityState state;
- TransportSecurityStateTest::SetEnableStaticExpectStaple(&state, true);
+ TransportSecurityStateTest::EnableStaticExpectStaple(&state);
MockCertificateReportSender reporter;
state.SetReportSender(&reporter);
« no previous file with comments | « net/http/transport_security_state.cc ('k') | net/quic/quic_crypto_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698