Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: net/quic/quic_packet_generator_test.cc

Issue 1562833003: relnote: Clear the FEC group in QuicPacketCreator when encryption_level is none and close the conne… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@26_CL_111359954
Patch Set: sync quic_error_map with quic_protocol Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/macros.h" 9 #include "base/macros.h"
10 #include "net/quic/crypto/crypto_protocol.h" 10 #include "net/quic/crypto/crypto_protocol.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 public: 112 public:
113 QuicPacketGeneratorTest() 113 QuicPacketGeneratorTest()
114 : framer_(QuicSupportedVersions(), 114 : framer_(QuicSupportedVersions(),
115 QuicTime::Zero(), 115 QuicTime::Zero(),
116 Perspective::IS_CLIENT), 116 Perspective::IS_CLIENT),
117 generator_(42, &framer_, &random_, &buffer_allocator_, &delegate_), 117 generator_(42, &framer_, &random_, &buffer_allocator_, &delegate_),
118 creator_(QuicPacketGeneratorPeer::GetPacketCreator(&generator_)) { 118 creator_(QuicPacketGeneratorPeer::GetPacketCreator(&generator_)) {
119 generator_.set_fec_send_policy(GetParam()); 119 generator_.set_fec_send_policy(GetParam());
120 // TODO(ianswett): Fix this test so it uses a non-null encrypter. 120 // TODO(ianswett): Fix this test so it uses a non-null encrypter.
121 FLAGS_quic_never_write_unencrypted_data = false; 121 FLAGS_quic_never_write_unencrypted_data = false;
122 FLAGS_quic_no_unencrypted_fec = false;
122 } 123 }
123 124
124 ~QuicPacketGeneratorTest() override { 125 ~QuicPacketGeneratorTest() override {
125 for (SerializedPacket& packet : packets_) { 126 for (SerializedPacket& packet : packets_) {
126 delete packet.packet; 127 delete packet.packet;
127 delete packet.retransmittable_frames; 128 delete packet.retransmittable_frames;
128 } 129 }
129 } 130 }
130 131
131 void SavePacket(SerializedPacket* packet) { 132 void SavePacket(SerializedPacket* packet) {
(...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 EXPECT_CALL(delegate_, OnSerializedPacket(_)) 1708 EXPECT_CALL(delegate_, OnSerializedPacket(_))
1708 .WillOnce(Invoke(this, &QuicPacketGeneratorTest::SavePacket)); 1709 .WillOnce(Invoke(this, &QuicPacketGeneratorTest::SavePacket));
1709 generator_.FlushAllQueuedFrames(); 1710 generator_.FlushAllQueuedFrames();
1710 EXPECT_FALSE(generator_.HasQueuedFrames()); 1711 EXPECT_FALSE(generator_.HasQueuedFrames());
1711 generator_.SetCurrentPath(kTestPathId1, 1, 0); 1712 generator_.SetCurrentPath(kTestPathId1, 1, 0);
1712 EXPECT_EQ(kTestPathId1, QuicPacketCreatorPeer::GetCurrentPath(creator_)); 1713 EXPECT_EQ(kTestPathId1, QuicPacketCreatorPeer::GetCurrentPath(creator_));
1713 } 1714 }
1714 1715
1715 } // namespace test 1716 } // namespace test
1716 } // namespace net 1717 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698