Index: net/http/http_response_headers_unittest.cc |
diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc |
index 00608e25f0df1ae13991ba23fa9d09d44ef0ba6b..3c8d9362ec711988f34996274181d30e67279a8b 100644 |
--- a/net/http/http_response_headers_unittest.cc |
+++ b/net/http/http_response_headers_unittest.cc |
@@ -1642,7 +1642,7 @@ TEST(HttpResponseHeadersTest, RemoveIndividualHeader) { |
const struct { |
const char* orig_headers; |
const char* to_remove_name; |
- const char* to_remove_value; |
+ const char* to_remove_values; |
rvargas (doing something else)
2012/07/19 19:11:02
nit: I would still use singular here.
battre
2012/07/23 13:31:11
Done.
|
const char* expected_headers; |
} tests[] = { |
{ "HTTP/1.1 200 OK\n" |
@@ -1685,7 +1685,33 @@ TEST(HttpResponseHeadersTest, RemoveIndividualHeader) { |
"Content-Length: 450\n" |
"Cache-control: max-age=10000\n" |
}, |
+ { "HTTP/1.1 200 OK\n" |
+ "connection: keep-alive \n" |
+ "Foo: bar, baz\n" |
rvargas (doing something else)
2012/07/19 19:11:02
How about adding another "Foo: bar\n" line here (t
battre
2012/07/23 13:31:11
Done.
|
+ "Cache-control: max-age=10000\n", |
+ |
+ "Foo", |
+ |
+ "bar, baz", // Space in value. |
+ "HTTP/1.1 200 OK\n" |
+ "connection: keep-alive\n" |
+ "Cache-control: max-age=10000\n" |
+ }, |
+ { "HTTP/1.1 200 OK\n" |
+ "connection: keep-alive \n" |
+ "Foo: bar, baz\n" |
+ "Cache-control: max-age=10000\n", |
+ |
+ "Foo", |
+ |
+ "baz", // Only partial match -> ignored. |
+ |
+ "HTTP/1.1 200 OK\n" |
+ "connection: keep-alive\n" |
+ "Foo: bar, baz\n" |
+ "Cache-control: max-age=10000\n" |
+ }, |
}; |
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { |
@@ -1695,8 +1721,8 @@ TEST(HttpResponseHeadersTest, RemoveIndividualHeader) { |
new net::HttpResponseHeaders(orig_headers)); |
std::string name(tests[i].to_remove_name); |
- std::string value(tests[i].to_remove_value); |
- parsed->RemoveHeaderWithValue(name, value); |
+ std::string values(tests[i].to_remove_values); |
+ parsed->RemoveHeaderLine(name, values); |
std::string resulting_headers; |
parsed->GetNormalizedHeaders(&resulting_headers); |