OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bidirectional_stream.h" | 5 #include "net/http/bidirectional_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1188 base::RunLoop().RunUntilIdle(); | 1188 base::RunLoop().RunUntilIdle(); |
1189 EXPECT_EQ(ERR_SPDY_PROTOCOL_ERROR, delegate->error()); | 1189 EXPECT_EQ(ERR_SPDY_PROTOCOL_ERROR, delegate->error()); |
1190 EXPECT_EQ(delegate->response_headers().end(), | 1190 EXPECT_EQ(delegate->response_headers().end(), |
1191 delegate->response_headers().find(":status")); | 1191 delegate->response_headers().find(":status")); |
1192 EXPECT_EQ(0, delegate->on_data_read_count()); | 1192 EXPECT_EQ(0, delegate->on_data_read_count()); |
1193 EXPECT_EQ(0, delegate->on_data_sent_count()); | 1193 EXPECT_EQ(0, delegate->on_data_sent_count()); |
1194 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); | 1194 EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); |
1195 // BidirectionalStreamSpdyStreamJob does not count the bytes sent for |rst| | 1195 // BidirectionalStreamSpdyStreamJob does not count the bytes sent for |rst| |
1196 // because it is sent after SpdyStream::Delegate::OnClose is called. | 1196 // because it is sent after SpdyStream::Delegate::OnClose is called. |
1197 EXPECT_EQ(CountWriteBytes(writes, 1), delegate->GetTotalSentBytes()); | 1197 EXPECT_EQ(CountWriteBytes(writes, 1), delegate->GetTotalSentBytes()); |
1198 EXPECT_EQ(CountReadBytes(reads, arraysize(reads)), | 1198 EXPECT_EQ(0, delegate->GetTotalReceivedBytes()); |
Ryan Hamilton
2016/05/13 22:03:15
Can you explain why this expectation is changing?
dahollings
2016/05/16 22:00:17
The coalescer (new file) was catching the invalid
| |
1199 delegate->GetTotalReceivedBytes()); | |
1200 } | 1199 } |
1201 | 1200 |
1202 INSTANTIATE_TEST_CASE_P(CancelOrDeleteTests, | 1201 INSTANTIATE_TEST_CASE_P(CancelOrDeleteTests, |
1203 BidirectionalStreamTest, | 1202 BidirectionalStreamTest, |
1204 ::testing::Values(true, false)); | 1203 ::testing::Values(true, false)); |
1205 | 1204 |
1206 TEST_P(BidirectionalStreamTest, CancelOrDeleteStreamDuringOnHeadersReceived) { | 1205 TEST_P(BidirectionalStreamTest, CancelOrDeleteStreamDuringOnHeadersReceived) { |
1207 std::unique_ptr<SpdySerializedFrame> req( | 1206 std::unique_ptr<SpdySerializedFrame> req( |
1208 spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST)); | 1207 spdy_util_.ConstructSpdyGet("https://www.example.org", 1, LOWEST)); |
1209 | 1208 |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1500 AlternativeServiceVector alternative_service_vector = | 1499 AlternativeServiceVector alternative_service_vector = |
1501 http_session_->http_server_properties()->GetAlternativeServices(server); | 1500 http_session_->http_server_properties()->GetAlternativeServices(server); |
1502 ASSERT_EQ(1u, alternative_service_vector.size()); | 1501 ASSERT_EQ(1u, alternative_service_vector.size()); |
1503 EXPECT_EQ(AlternateProtocolFromNextProto(kProtoQUIC1SPDY3), | 1502 EXPECT_EQ(AlternateProtocolFromNextProto(kProtoQUIC1SPDY3), |
1504 alternative_service_vector[0].protocol); | 1503 alternative_service_vector[0].protocol); |
1505 EXPECT_EQ("www.example.org", alternative_service_vector[0].host); | 1504 EXPECT_EQ("www.example.org", alternative_service_vector[0].host); |
1506 EXPECT_EQ(443, alternative_service_vector[0].port); | 1505 EXPECT_EQ(443, alternative_service_vector[0].port); |
1507 } | 1506 } |
1508 | 1507 |
1509 } // namespace net | 1508 } // namespace net |
OLD | NEW |