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

Side by Side Diff: net/tools/quic/test_tools/quic_test_utils.cc

Issue 420313005: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0723
Patch Set: change QUIC packet size to 1350 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
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/tools/quic/test_tools/quic_test_utils.h" 5 #include "net/tools/quic/test_tools/quic_test_utils.h"
6 6
7 #include "net/quic/quic_connection.h" 7 #include "net/quic/quic_connection.h"
8 #include "net/quic/test_tools/quic_connection_peer.h" 8 #include "net/quic/test_tools/quic_connection_peer.h"
9 #include "net/quic/test_tools/quic_test_utils.h" 9 #include "net/quic/test_tools/quic_test_utils.h"
10 #include "net/tools/quic/quic_epoll_connection_helper.h" 10 #include "net/tools/quic/quic_epoll_connection_helper.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 MockConnection::~MockConnection() { 63 MockConnection::~MockConnection() {
64 } 64 }
65 65
66 void MockConnection::AdvanceTime(QuicTime::Delta delta) { 66 void MockConnection::AdvanceTime(QuicTime::Delta delta) {
67 static_cast<MockHelper*>(helper())->AdvanceTime(delta); 67 static_cast<MockHelper*>(helper())->AdvanceTime(delta);
68 } 68 }
69 69
70 QuicAckFrame MakeAckFrameWithNackRanges( 70 QuicAckFrame MakeAckFrameWithNackRanges(
71 size_t num_nack_ranges, QuicPacketSequenceNumber least_unacked) { 71 size_t num_nack_ranges, QuicPacketSequenceNumber least_unacked) {
72 QuicAckFrame ack = MakeAckFrame(2 * num_nack_ranges + least_unacked, 72 QuicAckFrame ack = MakeAckFrame(2 * num_nack_ranges + least_unacked);
73 least_unacked);
74 // Add enough missing packets to get num_nack_ranges nack ranges. 73 // Add enough missing packets to get num_nack_ranges nack ranges.
75 for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) { 74 for (QuicPacketSequenceNumber i = 1; i < 2 * num_nack_ranges; i += 2) {
76 ack.received_info.missing_packets.insert(least_unacked + i); 75 ack.missing_packets.insert(least_unacked + i);
77 } 76 }
78 return ack; 77 return ack;
79 } 78 }
80 79
81 TestSession::TestSession(QuicConnection* connection, 80 TestSession::TestSession(QuicConnection* connection,
82 const QuicConfig& config) 81 const QuicConfig& config)
83 : QuicSession(connection, config), 82 : QuicSession(connection, config),
84 crypto_stream_(NULL) { 83 crypto_stream_(NULL) {
85 InitializeSession(); 84 InitializeSession();
86 } 85 }
(...skipping 22 matching lines...) Expand all
109 108
110 MockAckNotifierDelegate::MockAckNotifierDelegate() { 109 MockAckNotifierDelegate::MockAckNotifierDelegate() {
111 } 110 }
112 111
113 MockAckNotifierDelegate::~MockAckNotifierDelegate() { 112 MockAckNotifierDelegate::~MockAckNotifierDelegate() {
114 } 113 }
115 114
116 } // namespace test 115 } // namespace test
117 } // namespace tools 116 } // namespace tools
118 } // namespace net 117 } // namespace net
OLDNEW
« net/quic/test_tools/quic_test_utils.h ('K') | « net/tools/quic/quic_spdy_client_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698