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

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

Issue 1661863002: Remove a test-only SerializedPacket constructor from QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@113110142
Patch Set: Created 4 years, 10 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 | « no previous file | 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 <ostream> 7 #include <ostream>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 QuicFrames* retransmittable_frames = 461 QuicFrames* retransmittable_frames =
462 retransmittable == HAS_RETRANSMITTABLE_DATA ? new QuicFrames() 462 retransmittable == HAS_RETRANSMITTABLE_DATA ? new QuicFrames()
463 : nullptr; 463 : nullptr;
464 char buffer[kMaxPacketSize]; 464 char buffer[kMaxPacketSize];
465 size_t encrypted_length = 465 size_t encrypted_length =
466 QuicConnectionPeer::GetFramer(this)->EncryptPayload( 466 QuicConnectionPeer::GetFramer(this)->EncryptPayload(
467 ENCRYPTION_NONE, path_id, packet_number, *packet, buffer, 467 ENCRYPTION_NONE, path_id, packet_number, *packet, buffer,
468 kMaxPacketSize); 468 kMaxPacketSize);
469 delete packet; 469 delete packet;
470 SerializedPacket serialized_packet( 470 SerializedPacket serialized_packet(
471 kDefaultPathId, packet_number, PACKET_6BYTE_PACKET_NUMBER, buffer, 471 kDefaultPathId, packet_number, PACKET_6BYTE_PACKET_NUMBER,
472 encrypted_length, false, entropy_hash, retransmittable_frames, false, 472 new QuicEncryptedPacket(buffer, encrypted_length, false), entropy_hash,
473 NOT_HANDSHAKE, has_ack, has_pending_frames, ENCRYPTION_NONE); 473 retransmittable_frames, has_ack, has_pending_frames);
474 OnSerializedPacket(&serialized_packet); 474 OnSerializedPacket(&serialized_packet);
475 } 475 }
476 476
477 QuicConsumedData SendStreamDataWithString( 477 QuicConsumedData SendStreamDataWithString(
478 QuicStreamId id, 478 QuicStreamId id,
479 StringPiece data, 479 StringPiece data,
480 QuicStreamOffset offset, 480 QuicStreamOffset offset,
481 bool fin, 481 bool fin,
482 QuicAckListenerInterface* listener) { 482 QuicAckListenerInterface* listener) {
483 return SendStreamDataWithStringHelper(id, data, offset, fin, 483 return SendStreamDataWithStringHelper(id, data, offset, fin,
(...skipping 5021 matching lines...) Expand 10 before | Expand all | Expand 10 after
5505 QuicStreamFrame stream_frame(1u, false, 0u, StringPiece()); 5505 QuicStreamFrame stream_frame(1u, false, 0u, StringPiece());
5506 EXPECT_DFATAL(ProcessFramePacket(QuicFrame(&stream_frame)), 5506 EXPECT_DFATAL(ProcessFramePacket(QuicFrame(&stream_frame)),
5507 "Received a packet with multipath flag on when multipath is " 5507 "Received a packet with multipath flag on when multipath is "
5508 "not enabled."); 5508 "not enabled.");
5509 EXPECT_FALSE(connection_.connected()); 5509 EXPECT_FALSE(connection_.connected());
5510 } 5510 }
5511 5511
5512 } // namespace 5512 } // namespace
5513 } // namespace test 5513 } // namespace test
5514 } // namespace net 5514 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698