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/http/http_stream_parser.h" | 5 #include "net/http/http_stream_parser.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 394 |
395 rv = parser.ReadResponseHeaders(callback.callback()); | 395 rv = parser.ReadResponseHeaders(callback.callback()); |
396 if (i == arraysize(reads) - 1) { | 396 if (i == arraysize(reads) - 1) { |
397 EXPECT_EQ(OK, rv); | 397 EXPECT_EQ(OK, rv); |
398 EXPECT_TRUE(response_info.headers.get()); | 398 EXPECT_TRUE(response_info.headers.get()); |
399 } else { | 399 } else { |
400 if (protocol == HTTP) { | 400 if (protocol == HTTP) { |
401 EXPECT_EQ(ERR_CONNECTION_CLOSED, rv); | 401 EXPECT_EQ(ERR_CONNECTION_CLOSED, rv); |
402 EXPECT_TRUE(response_info.headers.get()); | 402 EXPECT_TRUE(response_info.headers.get()); |
403 } else { | 403 } else { |
404 EXPECT_EQ(ERR_HEADERS_TRUNCATED, rv); | 404 EXPECT_EQ(ERR_RESPONSE_HEADERS_TRUNCATED, rv); |
405 EXPECT_FALSE(response_info.headers.get()); | 405 EXPECT_FALSE(response_info.headers.get()); |
406 } | 406 } |
407 } | 407 } |
408 } | 408 } |
409 } | 409 } |
410 } | 410 } |
411 | 411 |
412 } // namespace net | 412 } // namespace net |
OLD | NEW |