OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/quic_time_wait_list_manager.h" | 5 #include "net/tools/quic/quic_time_wait_list_manager.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include "net/quic/crypto/crypto_protocol.h" | 9 #include "net/quic/crypto/crypto_protocol.h" |
10 #include "net/quic/crypto/null_encrypter.h" | 10 #include "net/quic/crypto/null_encrypter.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 header.entropy_flag = false; | 145 header.entropy_flag = false; |
146 header.entropy_hash = 0; | 146 header.entropy_hash = 0; |
147 header.fec_flag = false; | 147 header.fec_flag = false; |
148 header.is_in_fec_group = NOT_IN_FEC_GROUP; | 148 header.is_in_fec_group = NOT_IN_FEC_GROUP; |
149 header.fec_group = 0; | 149 header.fec_group = 0; |
150 QuicStreamFrame stream_frame(1, false, 0, MakeIOVector("data")); | 150 QuicStreamFrame stream_frame(1, false, 0, MakeIOVector("data")); |
151 QuicFrame frame(&stream_frame); | 151 QuicFrame frame(&stream_frame); |
152 QuicFrames frames; | 152 QuicFrames frames; |
153 frames.push_back(frame); | 153 frames.push_back(frame); |
154 scoped_ptr<QuicPacket> packet( | 154 scoped_ptr<QuicPacket> packet( |
155 BuildUnsizedDataPacket(&framer_, header, frames).packet); | 155 BuildUnsizedDataPacket(&framer_, header, frames)); |
156 EXPECT_TRUE(packet != nullptr); | 156 EXPECT_TRUE(packet != nullptr); |
157 QuicEncryptedPacket* encrypted = framer_.EncryptPacket(ENCRYPTION_NONE, | 157 QuicEncryptedPacket* encrypted = framer_.EncryptPacket(ENCRYPTION_NONE, |
158 sequence_number, | 158 sequence_number, |
159 *packet); | 159 *packet); |
160 EXPECT_TRUE(encrypted != nullptr); | 160 EXPECT_TRUE(encrypted != nullptr); |
161 return encrypted; | 161 return encrypted; |
162 } | 162 } |
163 | 163 |
164 NiceMock<MockFakeTimeEpollServer> epoll_server_; | 164 NiceMock<MockFakeTimeEpollServer> epoll_server_; |
165 StrictMock<MockPacketWriter> writer_; | 165 StrictMock<MockPacketWriter> writer_; |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 time_wait_list_manager_.num_connections()); | 521 time_wait_list_manager_.num_connections()); |
522 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); | 522 EXPECT_FALSE(IsConnectionIdInTimeWait(id_to_evict)); |
523 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); | 523 EXPECT_TRUE(IsConnectionIdInTimeWait(current_connection_id)); |
524 } | 524 } |
525 } | 525 } |
526 | 526 |
527 } // namespace | 527 } // namespace |
528 } // namespace test | 528 } // namespace test |
529 } // namespace tools | 529 } // namespace tools |
530 } // namespace net | 530 } // namespace net |
OLD | NEW |