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

Unified Diff: net/proxy/proxy_server_unittest.cc

Issue 662553002: Convert ARRAYSIZE_UNSAFE -> arraysize in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/proxy/proxy_list_unittest.cc ('k') | net/quic/crypto/crypto_utils_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_server_unittest.cc
diff --git a/net/proxy/proxy_server_unittest.cc b/net/proxy/proxy_server_unittest.cc
index 7646467538bcb2ae00959290cb0e22328bd88831..2471b59cc48548dfb7d54110f49c58179cb1746a 100644
--- a/net/proxy/proxy_server_unittest.cc
+++ b/net/proxy/proxy_server_unittest.cc
@@ -159,7 +159,7 @@ TEST(ProxyServerTest, FromURI) {
},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
+ for (size_t i = 0; i < arraysize(tests); ++i) {
net::ProxyServer uri =
net::ProxyServer::FromURI(tests[i].input_uri,
net::ProxyServer::SCHEME_HTTP);
@@ -202,7 +202,7 @@ TEST(ProxyServerTest, Invalid) {
"http:", // ambiguous, but will fail because of bad port.
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
+ for (size_t i = 0; i < arraysize(tests); ++i) {
net::ProxyServer uri =
net::ProxyServer::FromURI(tests[i], net::ProxyServer::SCHEME_HTTP);
EXPECT_FALSE(uri.is_valid());
@@ -220,7 +220,7 @@ TEST(ProxyServerTest, Whitespace) {
" \tfoopy:80 ",
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
+ for (size_t i = 0; i < arraysize(tests); ++i) {
net::ProxyServer uri =
net::ProxyServer::FromURI(tests[i], net::ProxyServer::SCHEME_HTTP);
EXPECT_EQ("foopy:80", uri.ToURI());
@@ -279,7 +279,7 @@ TEST(ProxyServerTest, FromPACString) {
},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
+ for (size_t i = 0; i < arraysize(tests); ++i) {
net::ProxyServer uri = net::ProxyServer::FromPacString(tests[i].input_pac);
EXPECT_TRUE(uri.is_valid());
EXPECT_EQ(tests[i].expected_uri, uri.ToURI());
@@ -295,7 +295,7 @@ TEST(ProxyServerTest, FromPACStringInvalid) {
"DIRECT foopy:10", // direct cannot have host/port.
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
+ for (size_t i = 0; i < arraysize(tests); ++i) {
net::ProxyServer uri = net::ProxyServer::FromPacString(tests[i]);
EXPECT_FALSE(uri.is_valid());
}
@@ -335,7 +335,7 @@ TEST(ProxyServerTest, ComparatorAndEquality) {
},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
+ for (size_t i = 0; i < arraysize(tests); ++i) {
// Parse the expected inputs to ProxyServer instances.
const net::ProxyServer server1 =
net::ProxyServer::FromURI(
« no previous file with comments | « net/proxy/proxy_list_unittest.cc ('k') | net/quic/crypto/crypto_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698