Chromium Code Reviews| 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 76790e3e69e526bdb60ba15cb6c0fd35cf68ce84..1666b59797bd7d2629cf8dd6b46ef54c259ada67 100644 |
| --- a/net/http/http_response_headers_unittest.cc |
| +++ b/net/http/http_response_headers_unittest.cc |
| @@ -33,6 +33,11 @@ struct ContentTypeTestData { |
| const std::string all_content_type; |
| }; |
| +struct MaxAgeTestData { |
| + const char* max_age_string; |
| + const int64 expected_seconds; |
| +}; |
| + |
| class HttpResponseHeadersTest : public testing::Test { |
| }; |
| @@ -2026,10 +2031,7 @@ TEST_F(HttpResponseHeadersCacheControlTest, MaxAgeEdgeCases) { |
| // This test doesn't use TEST_P() for consistency with the rest of the tests |
| // in this file. |
| // TODO(ricea): Port the tests in this file to use TEST_P(). |
| - const struct { |
| - const char* max_age_string; |
| - int64 expected_seconds; |
| - } tests[] = { |
| + const MaxAgeTestData tests[] = { |
|
Adam Rice
2014/08/11 12:17:54
It would probably be better to use ARRAYSIZE_UNSAF
Mostyn Bramley-Moore
2014/08/11 12:24:02
I could try converting them all to use arraysize,
Adam Rice
2014/08/11 12:28:46
Unless you're willing to refactor all the tests to
Mostyn Bramley-Moore
2014/08/11 12:35:36
I will give that a try, but it might take a day or
|
| {" 1 ", 1}, // Spaces are ignored |
| {"-1", -1}, // Negative numbers are passed through |
| {"--1", 0}, // Leading junk gives 0 |