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

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

Issue 572703003: Minor change to QUIC's retransmission to not link old retransmissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_75263809
Patch Set: Created 6 years, 3 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_connection.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_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 connection_.SetDefaultEncryptionLevel(ENCRYPTION_NONE); 2404 connection_.SetDefaultEncryptionLevel(ENCRYPTION_NONE);
2405 2405
2406 SendStreamDataToPeer(1, "foo", 0, !kFin, NULL); 2406 SendStreamDataToPeer(1, "foo", 0, !kFin, NULL);
2407 2407
2408 connection_.SetEncrypter(ENCRYPTION_INITIAL, new TaggingEncrypter(0x02)); 2408 connection_.SetEncrypter(ENCRYPTION_INITIAL, new TaggingEncrypter(0x02));
2409 connection_.SetDefaultEncryptionLevel(ENCRYPTION_INITIAL); 2409 connection_.SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
2410 2410
2411 SendStreamDataToPeer(2, "bar", 0, !kFin, NULL); 2411 SendStreamDataToPeer(2, "bar", 0, !kFin, NULL);
2412 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1); 2412 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
2413 2413
2414 connection_.RetransmitUnackedPackets(INITIAL_ENCRYPTION_ONLY); 2414 connection_.RetransmitUnackedPackets(ALL_INITIAL_RETRANSMISSION);
2415 } 2415 }
2416 2416
2417 TEST_P(QuicConnectionTest, BufferNonDecryptablePackets) { 2417 TEST_P(QuicConnectionTest, BufferNonDecryptablePackets) {
2418 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); 2418 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
2419 use_tagging_decrypter(); 2419 use_tagging_decrypter();
2420 2420
2421 const uint8 tag = 0x07; 2421 const uint8 tag = 0x07;
2422 framer_.SetEncrypter(ENCRYPTION_INITIAL, new TaggingEncrypter(tag)); 2422 framer_.SetEncrypter(ENCRYPTION_INITIAL, new TaggingEncrypter(tag));
2423 2423
2424 // Process an encrypted packet which can not yet be decrypted 2424 // Process an encrypted packet which can not yet be decrypted
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after
3895 QuicBlockedFrame blocked; 3895 QuicBlockedFrame blocked;
3896 blocked.stream_id = 3; 3896 blocked.stream_id = 3;
3897 EXPECT_CALL(visitor_, OnBlockedFrames(_)); 3897 EXPECT_CALL(visitor_, OnBlockedFrames(_));
3898 ProcessFramePacket(QuicFrame(&blocked)); 3898 ProcessFramePacket(QuicFrame(&blocked));
3899 EXPECT_TRUE(ack_alarm->IsSet()); 3899 EXPECT_TRUE(ack_alarm->IsSet());
3900 } 3900 }
3901 3901
3902 } // namespace 3902 } // namespace
3903 } // namespace test 3903 } // namespace test
3904 } // namespace net 3904 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698