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

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

Issue 990533002: Land Recent QUIC Changes until 03/06/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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_stats.cc ('k') | net/quic/quic_dispatcher.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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 header_.fec_group = fec_group; 841 header_.fec_group = fec_group;
842 842
843 QuicFrames frames; 843 QuicFrames frames;
844 QuicFrame frame(&frame1_); 844 QuicFrame frame(&frame1_);
845 frames.push_back(frame); 845 frames.push_back(frame);
846 QuicPacket* packet = BuildUnsizedDataPacket(&framer_, header_, frames); 846 QuicPacket* packet = BuildUnsizedDataPacket(&framer_, header_, frames);
847 EXPECT_TRUE(packet != nullptr); 847 EXPECT_TRUE(packet != nullptr);
848 return packet; 848 return packet;
849 } 849 }
850 850
851 QuicPacket* ConstructPingPacket(QuicPacketSequenceNumber number) {
852 header_.public_header.connection_id = connection_id_;
853 header_.packet_sequence_number = number;
854 header_.public_header.reset_flag = false;
855 header_.public_header.version_flag = false;
856 header_.entropy_flag = false;
857 header_.fec_flag = false;
858 header_.is_in_fec_group = NOT_IN_FEC_GROUP;
859 header_.fec_group = 0;
860
861 QuicPingFrame ping;
862
863 QuicFrames frames;
864 QuicFrame frame(&ping);
865 frames.push_back(frame);
866 QuicPacket* packet = BuildUnsizedDataPacket(&framer_, header_, frames);
867 EXPECT_TRUE(packet != nullptr);
868 return packet;
869 }
870
871 QuicPacket* ConstructClosePacket(QuicPacketSequenceNumber number, 851 QuicPacket* ConstructClosePacket(QuicPacketSequenceNumber number,
872 QuicFecGroupNumber fec_group) { 852 QuicFecGroupNumber fec_group) {
873 header_.public_header.connection_id = connection_id_; 853 header_.public_header.connection_id = connection_id_;
874 header_.packet_sequence_number = number; 854 header_.packet_sequence_number = number;
875 header_.public_header.reset_flag = false; 855 header_.public_header.reset_flag = false;
876 header_.public_header.version_flag = false; 856 header_.public_header.version_flag = false;
877 header_.entropy_flag = false; 857 header_.entropy_flag = false;
878 header_.fec_flag = false; 858 header_.fec_flag = false;
879 header_.is_in_fec_group = fec_group == 0u ? NOT_IN_FEC_GROUP : IN_FEC_GROUP; 859 header_.is_in_fec_group = fec_group == 0u ? NOT_IN_FEC_GROUP : IN_FEC_GROUP;
880 header_.fec_group = fec_group; 860 header_.fec_group = fec_group;
(...skipping 3491 matching lines...) Expand 10 before | Expand all | Expand 10 after
4372 // Regression test for b/18594622 4352 // Regression test for b/18594622
4373 scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate); 4353 scoped_refptr<MockAckNotifierDelegate> delegate(new MockAckNotifierDelegate);
4374 EXPECT_DFATAL( 4354 EXPECT_DFATAL(
4375 connection_.SendStreamDataWithString(3, "", 0, !kFin, delegate.get()), 4355 connection_.SendStreamDataWithString(3, "", 0, !kFin, delegate.get()),
4376 "Attempt to send empty stream frame"); 4356 "Attempt to send empty stream frame");
4377 } 4357 }
4378 4358
4379 } // namespace 4359 } // namespace
4380 } // namespace test 4360 } // namespace test
4381 } // namespace net 4361 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_stats.cc ('k') | net/quic/quic_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698