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

Unified Diff: net/http/http_security_headers_unittest.cc

Issue 1733973004: Limit Public-Key-Pins max-age to 60 days (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests Created 4 years, 10 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/http_security_headers.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_security_headers_unittest.cc
diff --git a/net/http/http_security_headers_unittest.cc b/net/http/http_security_headers_unittest.cc
index 9c0997217b329b52904d7941c10466f06a903ecc..7e80efa3270dfcf5114671afee93e20d263e1802 100644
--- a/net/http/http_security_headers_unittest.cc
+++ b/net/http/http_security_headers_unittest.cc
@@ -530,7 +530,7 @@ static void TestValidPKPHeaders(HashValueTag tag) {
"max-age=39408299 ;" + backup_pin + ";" + good_pin + "; ", chain_hashes,
&max_age, &include_subdomains, &hashes, &report_uri));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(39408299))));
+ std::min(kMaxHPKPAgeSecs, static_cast<int64_t>(INT64_C(39408299))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_FALSE(include_subdomains);
@@ -539,7 +539,7 @@ static void TestValidPKPHeaders(HashValueTag tag) {
good_pin + ";" + backup_pin + "; ",
chain_hashes, &max_age, &include_subdomains, &hashes, &report_uri));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
+ std::min(kMaxHPKPAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_TRUE(include_subdomains);
@@ -561,7 +561,7 @@ static void TestValidPKPHeaders(HashValueTag tag) {
" max-age=999999999999999999999999999999999999999999999 ; " +
backup_pin + ";" + good_pin + "; ",
chain_hashes, &max_age, &include_subdomains, &hashes, &report_uri));
- expect_max_age = base::TimeDelta::FromSeconds(kMaxHSTSAgeSecs);
+ expect_max_age = base::TimeDelta::FromSeconds(kMaxHPKPAgeSecs);
EXPECT_EQ(expect_max_age, max_age);
EXPECT_FALSE(include_subdomains);
@@ -570,7 +570,7 @@ static void TestValidPKPHeaders(HashValueTag tag) {
backup_pin + ";" + good_pin +
"; report-uri=\"http://example.test/foo\"",
chain_hashes, &max_age, &include_subdomains, &hashes, &report_uri));
- expect_max_age = base::TimeDelta::FromSeconds(kMaxHSTSAgeSecs);
+ expect_max_age = base::TimeDelta::FromSeconds(kMaxHPKPAgeSecs);
expect_report_uri = GURL("http://example.test/foo");
EXPECT_EQ(expect_max_age, max_age);
EXPECT_FALSE(include_subdomains);
« no previous file with comments | « net/http/http_security_headers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698