| 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/quic/chromium/quic_http_stream.h" | 5 #include "net/quic/chromium/quic_http_stream.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 PacketToWrite(IoMode mode, QuicReceivedPacket* packet) | 195 PacketToWrite(IoMode mode, QuicReceivedPacket* packet) |
| 196 : mode(mode), packet(packet) {} | 196 : mode(mode), packet(packet) {} |
| 197 PacketToWrite(IoMode mode, int rv) : mode(mode), packet(nullptr), rv(rv) {} | 197 PacketToWrite(IoMode mode, int rv) : mode(mode), packet(nullptr), rv(rv) {} |
| 198 IoMode mode; | 198 IoMode mode; |
| 199 QuicReceivedPacket* packet; | 199 QuicReceivedPacket* packet; |
| 200 int rv; | 200 int rv; |
| 201 }; | 201 }; |
| 202 | 202 |
| 203 QuicHttpStreamTest() | 203 QuicHttpStreamTest() |
| 204 : use_closing_stream_(false), | 204 : use_closing_stream_(false), |
| 205 crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), | 205 crypto_config_(crypto_test_utils::ProofVerifierForTesting()), |
| 206 read_buffer_(new IOBufferWithSize(4096)), | 206 read_buffer_(new IOBufferWithSize(4096)), |
| 207 promise_id_(kServerDataStreamId1), | 207 promise_id_(kServerDataStreamId1), |
| 208 stream_id_(kClientDataStreamId1), | 208 stream_id_(kClientDataStreamId1), |
| 209 connection_id_(2), | 209 connection_id_(2), |
| 210 client_maker_(GetParam(), | 210 client_maker_(GetParam(), |
| 211 connection_id_, | 211 connection_id_, |
| 212 &clock_, | 212 &clock_, |
| 213 kDefaultServerHostName, | 213 kDefaultServerHostName, |
| 214 Perspective::IS_CLIENT), | 214 Perspective::IS_CLIENT), |
| 215 server_maker_(GetParam(), | 215 server_maker_(GetParam(), |
| (...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2161 EXPECT_TRUE(AtEof()); | 2161 EXPECT_TRUE(AtEof()); |
| 2162 | 2162 |
| 2163 // QuicHttpStream::GetTotalSent/ReceivedBytes includes only headers. | 2163 // QuicHttpStream::GetTotalSent/ReceivedBytes includes only headers. |
| 2164 EXPECT_EQ(static_cast<int64_t>(spdy_request_headers_frame_length), | 2164 EXPECT_EQ(static_cast<int64_t>(spdy_request_headers_frame_length), |
| 2165 stream_->GetTotalSentBytes()); | 2165 stream_->GetTotalSentBytes()); |
| 2166 EXPECT_EQ(0, stream_->GetTotalReceivedBytes()); | 2166 EXPECT_EQ(0, stream_->GetTotalReceivedBytes()); |
| 2167 } | 2167 } |
| 2168 | 2168 |
| 2169 } // namespace test | 2169 } // namespace test |
| 2170 } // namespace net | 2170 } // namespace net |
| OLD | NEW |