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

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

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_flags.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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 sequence_number_(0), 80 sequence_number_(0),
81 connection_id_(2), 81 connection_id_(2),
82 data_("foo"), 82 data_("foo"),
83 creator_(connection_id_, &client_framer_, &mock_random_) { 83 creator_(connection_id_, &client_framer_, &mock_random_) {
84 creator_.set_connection_id_length(GetParam().connection_id_length); 84 creator_.set_connection_id_length(GetParam().connection_id_length);
85 client_framer_.set_visitor(&framer_visitor_); 85 client_framer_.set_visitor(&framer_visitor_);
86 client_framer_.set_received_entropy_calculator(&entropy_calculator_); 86 client_framer_.set_received_entropy_calculator(&entropy_calculator_);
87 server_framer_.set_visitor(&framer_visitor_); 87 server_framer_.set_visitor(&framer_visitor_);
88 } 88 }
89 89
90 virtual ~QuicPacketCreatorTest() override { 90 ~QuicPacketCreatorTest() override {}
91 }
92 91
93 void ProcessPacket(QuicPacket* packet) { 92 void ProcessPacket(QuicPacket* packet) {
94 scoped_ptr<QuicEncryptedPacket> encrypted( 93 scoped_ptr<QuicEncryptedPacket> encrypted(
95 server_framer_.EncryptPacket(ENCRYPTION_NONE, sequence_number_, 94 server_framer_.EncryptPacket(ENCRYPTION_NONE, sequence_number_,
96 *packet)); 95 *packet));
97 server_framer_.ProcessPacket(*encrypted); 96 server_framer_.ProcessPacket(*encrypted);
98 } 97 }
99 98
100 void CheckStreamFrame(const QuicFrame& frame, 99 void CheckStreamFrame(const QuicFrame& frame,
101 QuicStreamId stream_id, 100 QuicStreamId stream_id,
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 // After 64 calls, BoolSource will refresh the bucket - make sure it does. 1072 // After 64 calls, BoolSource will refresh the bucket - make sure it does.
1074 mock_random_.ChangeValue(); 1073 mock_random_.ChangeValue();
1075 } 1074 }
1076 1075
1077 delete frames_[0].stream_frame; 1076 delete frames_[0].stream_frame;
1078 } 1077 }
1079 1078
1080 } // namespace 1079 } // namespace
1081 } // namespace test 1080 } // namespace test
1082 } // namespace net 1081 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698