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

Unified Diff: net/http/http_security_headers_unittest.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years 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_response_info.cc ('k') | net/http/http_server_properties.h » ('j') | 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 4a510f2f11d7f86073ec8cc43a5630a8fc4cf3c5..9c0997217b329b52904d7941c10466f06a903ecc 100644
--- a/net/http/http_security_headers_unittest.cc
+++ b/net/http/http_security_headers_unittest.cc
@@ -21,13 +21,13 @@ namespace net {
namespace {
-HashValue GetTestHashValue(uint8 label, HashValueTag tag) {
+HashValue GetTestHashValue(uint8_t label, HashValueTag tag) {
HashValue hash_value(tag);
memset(hash_value.data(), label, hash_value.size());
return hash_value;
}
-std::string GetTestPinImpl(uint8 label, HashValueTag tag, bool quoted) {
+std::string GetTestPinImpl(uint8_t label, HashValueTag tag, bool quoted) {
HashValue hash_value = GetTestHashValue(label, tag);
std::string base64;
base::Base64Encode(base::StringPiece(
@@ -50,11 +50,11 @@ std::string GetTestPinImpl(uint8 label, HashValueTag tag, bool quoted) {
return ret;
}
-std::string GetTestPin(uint8 label, HashValueTag tag) {
+std::string GetTestPin(uint8_t label, HashValueTag tag) {
return GetTestPinImpl(label, tag, true);
}
-std::string GetTestPinUnquoted(uint8 label, HashValueTag tag) {
+std::string GetTestPinUnquoted(uint8_t label, HashValueTag tag) {
return GetTestPinImpl(label, tag, false);
}
@@ -389,7 +389,7 @@ TEST_F(HttpSecurityHeadersTest, ValidSTSHeaders) {
"max-age=39408299 ;incLudesUbdOmains", &max_age,
&include_subdomains));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64>(INT64_C(39408299))));
+ std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(39408299))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_TRUE(include_subdomains);
@@ -397,7 +397,7 @@ TEST_F(HttpSecurityHeadersTest, ValidSTSHeaders) {
"max-age=394082038 ; incLudesUbdOmains", &max_age,
&include_subdomains));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64>(INT64_C(394082038))));
+ std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_TRUE(include_subdomains);
@@ -405,7 +405,7 @@ TEST_F(HttpSecurityHeadersTest, ValidSTSHeaders) {
"max-age=394082038 ; incLudesUbdOmains;", &max_age,
&include_subdomains));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64>(INT64_C(394082038))));
+ std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_TRUE(include_subdomains);
@@ -413,7 +413,7 @@ TEST_F(HttpSecurityHeadersTest, ValidSTSHeaders) {
";; max-age=394082038 ; incLudesUbdOmains; ;", &max_age,
&include_subdomains));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64>(INT64_C(394082038))));
+ std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_TRUE(include_subdomains);
@@ -421,7 +421,7 @@ TEST_F(HttpSecurityHeadersTest, ValidSTSHeaders) {
";; max-age=394082038 ;", &max_age,
&include_subdomains));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64>(INT64_C(394082038))));
+ std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_FALSE(include_subdomains);
@@ -429,7 +429,7 @@ TEST_F(HttpSecurityHeadersTest, ValidSTSHeaders) {
";; ; ; max-age=394082038;;; includeSubdomains ;; ;", &max_age,
&include_subdomains));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64>(INT64_C(394082038))));
+ std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_TRUE(include_subdomains);
@@ -437,7 +437,7 @@ TEST_F(HttpSecurityHeadersTest, ValidSTSHeaders) {
"incLudesUbdOmains ; max-age=394082038 ;;", &max_age,
&include_subdomains));
expect_max_age = base::TimeDelta::FromSeconds(
- std::min(kMaxHSTSAgeSecs, static_cast<int64>(INT64_C(394082038))));
+ std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_TRUE(include_subdomains);
@@ -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>(INT64_C(39408299))));
+ std::min(kMaxHSTSAgeSecs, 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>(INT64_C(394082038))));
+ std::min(kMaxHSTSAgeSecs, static_cast<int64_t>(INT64_C(394082038))));
EXPECT_EQ(expect_max_age, max_age);
EXPECT_TRUE(include_subdomains);
« no previous file with comments | « net/http/http_response_info.cc ('k') | net/http/http_server_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698