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

Unified Diff: net/http/http_util_unittest.cc

Issue 2624213002: net: remove AppendHeaderIfMissing() from HttpUtil (Closed)
Patch Set: Created 3 years, 11 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_util.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_util_unittest.cc
diff --git a/net/http/http_util_unittest.cc b/net/http/http_util_unittest.cc
index 34c984836203e45275db1ecfe1ae1fb91e293cd7..3560e2f477600b721df0fd2b93ebe75cc81a3e35 100644
--- a/net/http/http_util_unittest.cc
+++ b/net/http/http_util_unittest.cc
@@ -100,26 +100,6 @@ TEST(HttpUtilTest, IsSafeHeader) {
}
}
-TEST(HttpUtilTest, HasHeader) {
- static const struct {
- const char* const headers;
- const char* const name;
- bool expected_result;
- } tests[] = {
- { "", "foo", false },
- { "foo\r\nbar", "foo", false },
- { "ffoo: 1", "foo", false },
- { "foo: 1", "foo", true },
- { "foo: 1\r\nbar: 2", "foo", true },
- { "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) {
- bool result = HttpUtil::HasHeader(tests[i].headers, tests[i].name);
- EXPECT_EQ(tests[i].expected_result, result);
- }
-}
-
TEST(HttpUtilTest, HeadersIterator) {
std::string headers = "foo: 1\t\r\nbar: hello world\r\nbaz: 3 \r\n";
« no previous file with comments | « net/http/http_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698