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

Unified Diff: src/net/http/http_util_unittest.cc

Issue 4037: Some platform cleanup to net/ (Closed)
Patch Set: Created 12 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
« no previous file with comments | « src/net/http/http_transaction_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/net/http/http_util_unittest.cc
diff --git a/src/net/http/http_util_unittest.cc b/src/net/http/http_util_unittest.cc
index a531228953dcb1bf26709810e9cab3012cd1b9f1..8cccf3163bbc01356492fa5e7a9d6f3e10935cb0 100644
--- a/src/net/http/http_util_unittest.cc
+++ b/src/net/http/http_util_unittest.cc
@@ -28,7 +28,7 @@ TEST(HttpUtilTest, HasHeader) {
{ "fOO: 1\r\nbar: 2", "foo", true },
{ "g: 0\r\nfoo: 1\r\nbar: 2", "foo", true },
};
- for (size_t i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
bool result = HttpUtil::HasHeader(tests[i].headers, tests[i].name);
EXPECT_EQ(tests[i].expected_result, result);
}
@@ -107,7 +107,7 @@ TEST(HttpUtilTest, LocateEndOfHeaders) {
{ "foo\nbar\n\r\njunk", 10 },
{ "foo\nbar\r\n\njunk", 10 },
};
- for (size_t i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
int input_len = static_cast<int>(strlen(tests[i].input));
int eoh = HttpUtil::LocateEndOfHeaders(tests[i].input, input_len);
EXPECT_EQ(tests[i].expected_result, eoh);
@@ -404,7 +404,7 @@ TEST(HttpUtilTest, AssembleRawHeaders) {
},
};
- for (size_t i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
int input_len = static_cast<int>(strlen(tests[i].input));
std::string raw = HttpUtil::AssembleRawHeaders(tests[i].input, input_len);
std::replace(raw.begin(), raw.end(), '\0', '|');
@@ -435,7 +435,7 @@ TEST(HttpUtilTest, RequestUrlSanitize) {
"/"
}
};
- for (size_t i = 0; i < arraysize(tests); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) {
GURL url(GURL(tests[i].url));
std::string expected_spec(tests[i].expected_spec);
std::string expected_path(tests[i].expected_path);
« no previous file with comments | « src/net/http/http_transaction_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698