OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/tools/quic/test_tools/http_message_test_utils.h" | 5 #include "net/tools/quic/test_tools/http_message_test_utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 | 12 |
13 using base::StringPiece; | 13 using base::StringPiece; |
14 using std::string; | 14 using std::string; |
15 using std::vector; | 15 using std::vector; |
16 | 16 |
17 namespace net { | 17 namespace net { |
| 18 namespace tools { |
18 namespace test { | 19 namespace test { |
19 | 20 |
20 namespace { | 21 namespace { |
21 | 22 |
22 //const char* kContentEncoding = "content-encoding"; | 23 //const char* kContentEncoding = "content-encoding"; |
23 const char* kContentLength = "content-length"; | 24 const char* kContentLength = "content-length"; |
24 const char* kTransferCoding = "transfer-encoding"; | 25 const char* kTransferCoding = "transfer-encoding"; |
25 | 26 |
26 // Both kHTTPVersionString and kMethodString arrays are constructed to match | 27 // Both kHTTPVersionString and kMethodString arrays are constructed to match |
27 // the enum values defined in Version and Method of HTTPMessage. | 28 // the enum values defined in Version and Method of HTTPMessage. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 } | 164 } |
164 | 165 |
165 vector<StringPiece> content_lengths; | 166 vector<StringPiece> content_lengths; |
166 headers()->GetAllOfHeader(kContentLength, &content_lengths); | 167 headers()->GetAllOfHeader(kContentLength, &content_lengths); |
167 CHECK_GE(1ul, content_lengths.size()); | 168 CHECK_GE(1ul, content_lengths.size()); |
168 | 169 |
169 CHECK_EQ(has_complete_message_, IsCompleteMessage(*this)); | 170 CHECK_EQ(has_complete_message_, IsCompleteMessage(*this)); |
170 } | 171 } |
171 | 172 |
172 } // namespace test | 173 } // namespace test |
| 174 } // namespace tools |
173 } // namespace net | 175 } // namespace net |
OLD | NEW |