Index: net/http/http_stream_parser_unittest.cc |
diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc |
index 00119b3c5147ef0c3f3d4b62e7c7a97c4984a6de..8a1fc9acf731571d803e1b6786a824ebd7f70277 100644 |
--- a/net/http/http_stream_parser_unittest.cc |
+++ b/net/http/http_stream_parser_unittest.cc |
@@ -1126,12 +1126,15 @@ TEST(HttpStreamParser, ReceivedBytesNoHeaders) { |
int read_lengths[] = {response_size, 0}; |
get_runner.ReadBody(response_size, read_lengths); |
EXPECT_EQ(response_size, get_runner.parser()->received_bytes()); |
+ EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP0_9, |
+ get_runner.response_info()->connection_info); |
} |
// Test basic case where there is no keep-alive or extra data from the socket, |
// and the entire response is received in a single read. |
TEST(HttpStreamParser, ReceivedBytesNormal) { |
- std::string headers = "HTTP/1.1 200 OK\r\n" |
+ std::string headers = |
+ "HTTP/1.0 200 OK\r\n" |
"Content-Length: 7\r\n\r\n"; |
std::string body = "content"; |
std::string response = headers + body; |
@@ -1147,6 +1150,8 @@ TEST(HttpStreamParser, ReceivedBytesNormal) { |
get_runner.ReadBody(body_size, read_lengths); |
int64_t response_size = response.size(); |
EXPECT_EQ(response_size, get_runner.parser()->received_bytes()); |
+ EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP1_0, |
+ get_runner.response_info()->connection_info); |
} |
// Test that bytes that represent "next" response are not counted |
@@ -1173,6 +1178,8 @@ TEST(HttpStreamParser, ReceivedBytesExcludesNextResponse) { |
EXPECT_EQ(response_size, get_runner.parser()->received_bytes()); |
int64_t next_response_size = next_response.size(); |
EXPECT_EQ(next_response_size, get_runner.read_buffer()->offset()); |
+ EXPECT_EQ(HttpResponseInfo::CONNECTION_INFO_HTTP1_1, |
+ get_runner.response_info()->connection_info); |
} |
// Test that "received_bytes" calculation works fine when last read |