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

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

Issue 424903002: Remove FixRate congestion frame type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_quic_version_15_71718286
Patch Set: Created 6 years, 4 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_framer_test.cc ('k') | net/quic/quic_packet_generator_test.cc » ('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_creator.h" 5 #include "net/quic/quic_packet_creator.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "net/quic/crypto/null_encrypter.h" 8 #include "net/quic/crypto/null_encrypter.h"
9 #include "net/quic/crypto/quic_decrypter.h" 9 #include "net/quic/crypto/quic_decrypter.h"
10 #include "net/quic/crypto/quic_encrypter.h" 10 #include "net/quic/crypto/quic_encrypter.h"
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 QuicPacketCreatorPeer::SendVersionInPacket(&creator_), 866 QuicPacketCreatorPeer::SendVersionInPacket(&creator_),
867 PACKET_1BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP), 867 PACKET_1BYTE_SEQUENCE_NUMBER, NOT_IN_FEC_GROUP),
868 creator_.BytesFree()); 868 creator_.BytesFree());
869 869
870 // Add a variety of frame types and then a padding frame. 870 // Add a variety of frame types and then a padding frame.
871 QuicAckFrame ack_frame(MakeAckFrame(0u)); 871 QuicAckFrame ack_frame(MakeAckFrame(0u));
872 EXPECT_TRUE(creator_.AddSavedFrame(QuicFrame(&ack_frame))); 872 EXPECT_TRUE(creator_.AddSavedFrame(QuicFrame(&ack_frame)));
873 EXPECT_TRUE(creator_.HasPendingFrames()); 873 EXPECT_TRUE(creator_.HasPendingFrames());
874 874
875 QuicCongestionFeedbackFrame congestion_feedback; 875 QuicCongestionFeedbackFrame congestion_feedback;
876 congestion_feedback.type = kFixRate; 876 congestion_feedback.type = kTCP;
877 congestion_feedback.tcp.receive_window = 0x4030;
877 EXPECT_TRUE(creator_.AddSavedFrame(QuicFrame(&congestion_feedback))); 878 EXPECT_TRUE(creator_.AddSavedFrame(QuicFrame(&congestion_feedback)));
878 EXPECT_TRUE(creator_.HasPendingFrames()); 879 EXPECT_TRUE(creator_.HasPendingFrames());
879 880
880 QuicFrame frame; 881 QuicFrame frame;
881 size_t consumed = creator_.CreateStreamFrame( 882 size_t consumed = creator_.CreateStreamFrame(
882 1u, MakeIOVector("test"), 0u, false, &frame); 883 1u, MakeIOVector("test"), 0u, false, &frame);
883 EXPECT_EQ(4u, consumed); 884 EXPECT_EQ(4u, consumed);
884 ASSERT_TRUE(frame.stream_frame); 885 ASSERT_TRUE(frame.stream_frame);
885 EXPECT_TRUE(creator_.AddSavedFrame(frame)); 886 EXPECT_TRUE(creator_.AddSavedFrame(frame));
886 EXPECT_TRUE(creator_.HasPendingFrames()); 887 EXPECT_TRUE(creator_.HasPendingFrames());
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 // After 64 calls, BoolSource will refresh the bucket - make sure it does. 1013 // After 64 calls, BoolSource will refresh the bucket - make sure it does.
1013 mock_random_.ChangeValue(); 1014 mock_random_.ChangeValue();
1014 } 1015 }
1015 1016
1016 delete frames_[0].stream_frame; 1017 delete frames_[0].stream_frame;
1017 } 1018 }
1018 1019
1019 } // namespace 1020 } // namespace
1020 } // namespace test 1021 } // namespace test
1021 } // namespace net 1022 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_framer_test.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698