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/quic_packet_generator.h" | 5 #include "net/quic/quic_packet_generator.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 size_t num_stream_frames; | 99 size_t num_stream_frames; |
100 | 100 |
101 QuicFecGroupNumber fec_group; | 101 QuicFecGroupNumber fec_group; |
102 }; | 102 }; |
103 | 103 |
104 } // namespace | 104 } // namespace |
105 | 105 |
106 class QuicPacketGeneratorTest : public ::testing::Test { | 106 class QuicPacketGeneratorTest : public ::testing::Test { |
107 protected: | 107 protected: |
108 QuicPacketGeneratorTest() | 108 QuicPacketGeneratorTest() |
109 : framer_(QuicSupportedVersions(), QuicTime::Zero(), false), | 109 : framer_(QuicSupportedVersions(), |
| 110 QuicTime::Zero(), |
| 111 Perspective::IS_CLIENT), |
110 generator_(42, &framer_, &random_, &delegate_), | 112 generator_(42, &framer_, &random_, &delegate_), |
111 creator_(QuicPacketGeneratorPeer::GetPacketCreator(&generator_)), | 113 creator_(QuicPacketGeneratorPeer::GetPacketCreator(&generator_)), |
112 packet_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), | 114 packet_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), |
113 packet2_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), | 115 packet2_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), |
114 packet3_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), | 116 packet3_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), |
115 packet4_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), | 117 packet4_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), |
116 packet5_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), | 118 packet5_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), |
117 packet6_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), | 119 packet6_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), |
118 packet7_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), | 120 packet7_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr), |
119 packet8_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr) {} | 121 packet8_(0, PACKET_1BYTE_SEQUENCE_NUMBER, nullptr, 0, nullptr) {} |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 generator_.SetConnectionIdLength(7); | 1100 generator_.SetConnectionIdLength(7); |
1099 EXPECT_EQ(PACKET_8BYTE_CONNECTION_ID, creator_->connection_id_length()); | 1101 EXPECT_EQ(PACKET_8BYTE_CONNECTION_ID, creator_->connection_id_length()); |
1100 generator_.SetConnectionIdLength(8); | 1102 generator_.SetConnectionIdLength(8); |
1101 EXPECT_EQ(PACKET_8BYTE_CONNECTION_ID, creator_->connection_id_length()); | 1103 EXPECT_EQ(PACKET_8BYTE_CONNECTION_ID, creator_->connection_id_length()); |
1102 generator_.SetConnectionIdLength(9); | 1104 generator_.SetConnectionIdLength(9); |
1103 EXPECT_EQ(PACKET_8BYTE_CONNECTION_ID, creator_->connection_id_length()); | 1105 EXPECT_EQ(PACKET_8BYTE_CONNECTION_ID, creator_->connection_id_length()); |
1104 } | 1106 } |
1105 | 1107 |
1106 } // namespace test | 1108 } // namespace test |
1107 } // namespace net | 1109 } // namespace net |
OLD | NEW |