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

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

Issue 1905843003: Split out QuicAlarm creation from QuicConnectionHelper to new QuicAlarmFactory. No behavior change,… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@119753783
Patch Set: Rebase Created 4 years, 8 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_logger_unittest.cc ('k') | net/quic/quic_crypto_client_stream_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_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <memory> 8 #include <memory>
9 #include <ostream> 9 #include <ostream>
10 #include <utility> 10 #include <utility>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 const char* cipher_name() const override { return "StrictTagging"; } 199 const char* cipher_name() const override { return "StrictTagging"; }
200 // Use a distinct value starting with 0xFFFFFF, which is never used by TLS. 200 // Use a distinct value starting with 0xFFFFFF, which is never used by TLS.
201 uint32_t cipher_id() const override { return 0xFFFFFFF1; } 201 uint32_t cipher_id() const override { return 0xFFFFFFF1; }
202 202
203 private: 203 private:
204 const uint8_t tag_; 204 const uint8_t tag_;
205 }; 205 };
206 206
207 class TestConnectionHelper : public QuicConnectionHelperInterface { 207 class TestConnectionHelper : public QuicConnectionHelperInterface {
208 public: 208 public:
209 TestConnectionHelper(MockClock* clock, MockRandom* random_generator)
210 : clock_(clock), random_generator_(random_generator) {
211 clock_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
212 }
213
214 // QuicConnectionHelperInterface
215 const QuicClock* GetClock() const override { return clock_; }
216
217 QuicRandom* GetRandomGenerator() override { return random_generator_; }
218
219 QuicBufferAllocator* GetBufferAllocator() override {
220 return &buffer_allocator_;
221 }
222
223 private:
224 MockClock* clock_;
225 MockRandom* random_generator_;
226 SimpleBufferAllocator buffer_allocator_;
227
228 DISALLOW_COPY_AND_ASSIGN(TestConnectionHelper);
229 };
230
231 class TestAlarmFactory : public QuicAlarmFactory {
232 public:
209 class TestAlarm : public QuicAlarm { 233 class TestAlarm : public QuicAlarm {
210 public: 234 public:
211 explicit TestAlarm(QuicArenaScopedPtr<QuicAlarm::Delegate> delegate) 235 explicit TestAlarm(QuicArenaScopedPtr<QuicAlarm::Delegate> delegate)
212 : QuicAlarm(std::move(delegate)) {} 236 : QuicAlarm(std::move(delegate)) {}
213 237
214 void SetImpl() override {} 238 void SetImpl() override {}
215 void CancelImpl() override {} 239 void CancelImpl() override {}
216 using QuicAlarm::Fire; 240 using QuicAlarm::Fire;
217 }; 241 };
218 242
219 TestConnectionHelper(MockClock* clock, MockRandom* random_generator) 243 TestAlarmFactory() {}
220 : clock_(clock), random_generator_(random_generator) {
221 clock_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
222 }
223
224 // QuicConnectionHelperInterface
225 const QuicClock* GetClock() const override { return clock_; }
226
227 QuicRandom* GetRandomGenerator() override { return random_generator_; }
228 244
229 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override { 245 QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override {
230 return new TestAlarm(QuicArenaScopedPtr<QuicAlarm::Delegate>(delegate)); 246 return new TestAlarm(QuicArenaScopedPtr<QuicAlarm::Delegate>(delegate));
231 } 247 }
232 248
233 QuicArenaScopedPtr<QuicAlarm> CreateAlarm( 249 QuicArenaScopedPtr<QuicAlarm> CreateAlarm(
234 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate, 250 QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
235 QuicConnectionArena* arena) override { 251 QuicConnectionArena* arena) override {
236 return arena->New<TestAlarm>(std::move(delegate)); 252 return arena->New<TestAlarm>(std::move(delegate));
237 } 253 }
238 254
239 QuicBufferAllocator* GetBufferAllocator() override {
240 return &buffer_allocator_;
241 }
242
243 private: 255 private:
244 MockClock* clock_; 256 DISALLOW_COPY_AND_ASSIGN(TestAlarmFactory);
245 MockRandom* random_generator_;
246 SimpleBufferAllocator buffer_allocator_;
247
248 DISALLOW_COPY_AND_ASSIGN(TestConnectionHelper);
249 }; 257 };
250 258
251 class TestPacketWriter : public QuicPacketWriter { 259 class TestPacketWriter : public QuicPacketWriter {
252 public: 260 public:
253 TestPacketWriter(QuicVersion version, MockClock* clock) 261 TestPacketWriter(QuicVersion version, MockClock* clock)
254 : version_(version), 262 : version_(version),
255 framer_(SupportedVersions(version_)), 263 framer_(SupportedVersions(version_)),
256 last_packet_size_(0), 264 last_packet_size_(0),
257 write_blocked_(false), 265 write_blocked_(false),
258 write_should_fail_(false), 266 write_should_fail_(false),
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 QuicByteCount max_packet_size_; 428 QuicByteCount max_packet_size_;
421 429
422 DISALLOW_COPY_AND_ASSIGN(TestPacketWriter); 430 DISALLOW_COPY_AND_ASSIGN(TestPacketWriter);
423 }; 431 };
424 432
425 class TestConnection : public QuicConnection { 433 class TestConnection : public QuicConnection {
426 public: 434 public:
427 TestConnection(QuicConnectionId connection_id, 435 TestConnection(QuicConnectionId connection_id,
428 IPEndPoint address, 436 IPEndPoint address,
429 TestConnectionHelper* helper, 437 TestConnectionHelper* helper,
438 TestAlarmFactory* alarm_factory,
430 TestPacketWriter* writer, 439 TestPacketWriter* writer,
431 Perspective perspective, 440 Perspective perspective,
432 QuicVersion version) 441 QuicVersion version)
433 : QuicConnection(connection_id, 442 : QuicConnection(connection_id,
434 address, 443 address,
435 helper, 444 helper,
445 alarm_factory,
436 writer, 446 writer,
437 /* owns_writer= */ false, 447 /* owns_writer= */ false,
438 perspective, 448 perspective,
439 SupportedVersions(version)) { 449 SupportedVersions(version)) {
440 writer->set_perspective(perspective); 450 writer->set_perspective(perspective);
441 } 451 }
442 452
443 void SendAck() { QuicConnectionPeer::SendAck(this); } 453 void SendAck() { QuicConnectionPeer::SendAck(this); }
444 454
445 void SetSendAlgorithm(SendAlgorithmInterface* send_algorithm) { 455 void SetSendAlgorithm(SendAlgorithmInterface* send_algorithm) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 EXPECT_CALL(*send_algorithm, SetFromConfig(_, _)); 547 EXPECT_CALL(*send_algorithm, SetFromConfig(_, _));
538 SetFromConfig(config); 548 SetFromConfig(config);
539 549
540 // Normally, the pacing would be disabled in the test, but calling 550 // Normally, the pacing would be disabled in the test, but calling
541 // SetFromConfig enables it. Set nearly-infinite bandwidth to make the 551 // SetFromConfig enables it. Set nearly-infinite bandwidth to make the
542 // pacing algorithm work. 552 // pacing algorithm work.
543 EXPECT_CALL(*send_algorithm, PacingRate()) 553 EXPECT_CALL(*send_algorithm, PacingRate())
544 .WillRepeatedly(Return(QuicBandwidth::FromKBytesPerSecond(10000))); 554 .WillRepeatedly(Return(QuicBandwidth::FromKBytesPerSecond(10000)));
545 } 555 }
546 556
547 TestConnectionHelper::TestAlarm* GetAckAlarm() { 557 TestAlarmFactory::TestAlarm* GetAckAlarm() {
548 return reinterpret_cast<TestConnectionHelper::TestAlarm*>( 558 return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
549 QuicConnectionPeer::GetAckAlarm(this)); 559 QuicConnectionPeer::GetAckAlarm(this));
550 } 560 }
551 561
552 TestConnectionHelper::TestAlarm* GetPingAlarm() { 562 TestAlarmFactory::TestAlarm* GetPingAlarm() {
553 return reinterpret_cast<TestConnectionHelper::TestAlarm*>( 563 return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
554 QuicConnectionPeer::GetPingAlarm(this)); 564 QuicConnectionPeer::GetPingAlarm(this));
555 } 565 }
556 566
557 TestConnectionHelper::TestAlarm* GetResumeWritesAlarm() { 567 TestAlarmFactory::TestAlarm* GetResumeWritesAlarm() {
558 return reinterpret_cast<TestConnectionHelper::TestAlarm*>( 568 return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
559 QuicConnectionPeer::GetResumeWritesAlarm(this)); 569 QuicConnectionPeer::GetResumeWritesAlarm(this));
560 } 570 }
561 571
562 TestConnectionHelper::TestAlarm* GetRetransmissionAlarm() { 572 TestAlarmFactory::TestAlarm* GetRetransmissionAlarm() {
563 return reinterpret_cast<TestConnectionHelper::TestAlarm*>( 573 return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
564 QuicConnectionPeer::GetRetransmissionAlarm(this)); 574 QuicConnectionPeer::GetRetransmissionAlarm(this));
565 } 575 }
566 576
567 TestConnectionHelper::TestAlarm* GetSendAlarm() { 577 TestAlarmFactory::TestAlarm* GetSendAlarm() {
568 return reinterpret_cast<TestConnectionHelper::TestAlarm*>( 578 return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
569 QuicConnectionPeer::GetSendAlarm(this)); 579 QuicConnectionPeer::GetSendAlarm(this));
570 } 580 }
571 581
572 TestConnectionHelper::TestAlarm* GetTimeoutAlarm() { 582 TestAlarmFactory::TestAlarm* GetTimeoutAlarm() {
573 return reinterpret_cast<TestConnectionHelper::TestAlarm*>( 583 return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
574 QuicConnectionPeer::GetTimeoutAlarm(this)); 584 QuicConnectionPeer::GetTimeoutAlarm(this));
575 } 585 }
576 586
577 TestConnectionHelper::TestAlarm* GetMtuDiscoveryAlarm() { 587 TestAlarmFactory::TestAlarm* GetMtuDiscoveryAlarm() {
578 return reinterpret_cast<TestConnectionHelper::TestAlarm*>( 588 return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
579 QuicConnectionPeer::GetMtuDiscoveryAlarm(this)); 589 QuicConnectionPeer::GetMtuDiscoveryAlarm(this));
580 } 590 }
581 591
582 void DisableTailLossProbe() { 592 void DisableTailLossProbe() {
583 QuicSentPacketManagerPeer::SetMaxTailLossProbes( 593 QuicSentPacketManagerPeer::SetMaxTailLossProbes(
584 QuicConnectionPeer::GetSentPacketManager(this), 0); 594 QuicConnectionPeer::GetSentPacketManager(this), 0);
585 } 595 }
586 596
587 using QuicConnection::SelectMutualVersion; 597 using QuicConnection::SelectMutualVersion;
588 using QuicConnection::set_defer_send_in_response_to_packets; 598 using QuicConnection::set_defer_send_in_response_to_packets;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 class QuicConnectionTest : public ::testing::TestWithParam<TestParams> { 640 class QuicConnectionTest : public ::testing::TestWithParam<TestParams> {
631 protected: 641 protected:
632 QuicConnectionTest() 642 QuicConnectionTest()
633 : connection_id_(42), 643 : connection_id_(42),
634 framer_(SupportedVersions(version()), 644 framer_(SupportedVersions(version()),
635 QuicTime::Zero(), 645 QuicTime::Zero(),
636 Perspective::IS_CLIENT), 646 Perspective::IS_CLIENT),
637 send_algorithm_(new StrictMock<MockSendAlgorithm>), 647 send_algorithm_(new StrictMock<MockSendAlgorithm>),
638 loss_algorithm_(new MockLossAlgorithm()), 648 loss_algorithm_(new MockLossAlgorithm()),
639 helper_(new TestConnectionHelper(&clock_, &random_generator_)), 649 helper_(new TestConnectionHelper(&clock_, &random_generator_)),
650 alarm_factory_(new TestAlarmFactory()),
640 peer_creator_(connection_id_, 651 peer_creator_(connection_id_,
641 &framer_, 652 &framer_,
642 &random_generator_, 653 &random_generator_,
643 &buffer_allocator_, 654 &buffer_allocator_,
644 /*delegate=*/nullptr), 655 /*delegate=*/nullptr),
645 writer_(new TestPacketWriter(version(), &clock_)), 656 writer_(new TestPacketWriter(version(), &clock_)),
646 connection_(connection_id_, 657 connection_(connection_id_,
647 kPeerAddress, 658 kPeerAddress,
648 helper_.get(), 659 helper_.get(),
660 alarm_factory_.get(),
649 writer_.get(), 661 writer_.get(),
650 Perspective::IS_CLIENT, 662 Perspective::IS_CLIENT,
651 version()), 663 version()),
652 creator_(QuicConnectionPeer::GetPacketCreator(&connection_)), 664 creator_(QuicConnectionPeer::GetPacketCreator(&connection_)),
653 generator_(QuicConnectionPeer::GetPacketGenerator(&connection_)), 665 generator_(QuicConnectionPeer::GetPacketGenerator(&connection_)),
654 manager_(QuicConnectionPeer::GetSentPacketManager(&connection_)), 666 manager_(QuicConnectionPeer::GetSentPacketManager(&connection_)),
655 frame1_(1, false, 0, StringPiece(data1)), 667 frame1_(1, false, 0, StringPiece(data1)),
656 frame2_(1, false, 3, StringPiece(data2)), 668 frame2_(1, false, 3, StringPiece(data2)),
657 packet_number_length_(PACKET_6BYTE_PACKET_NUMBER), 669 packet_number_length_(PACKET_6BYTE_PACKET_NUMBER),
658 connection_id_length_(PACKET_8BYTE_CONNECTION_ID) { 670 connection_id_length_(PACKET_8BYTE_CONNECTION_ID) {
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 QuicConnectionId connection_id_; 1002 QuicConnectionId connection_id_;
991 QuicFramer framer_; 1003 QuicFramer framer_;
992 MockEntropyCalculator entropy_calculator_; 1004 MockEntropyCalculator entropy_calculator_;
993 1005
994 MockSendAlgorithm* send_algorithm_; 1006 MockSendAlgorithm* send_algorithm_;
995 MockLossAlgorithm* loss_algorithm_; 1007 MockLossAlgorithm* loss_algorithm_;
996 MockClock clock_; 1008 MockClock clock_;
997 MockRandom random_generator_; 1009 MockRandom random_generator_;
998 SimpleBufferAllocator buffer_allocator_; 1010 SimpleBufferAllocator buffer_allocator_;
999 std::unique_ptr<TestConnectionHelper> helper_; 1011 std::unique_ptr<TestConnectionHelper> helper_;
1012 std::unique_ptr<TestAlarmFactory> alarm_factory_;
1000 QuicPacketCreator peer_creator_; 1013 QuicPacketCreator peer_creator_;
1001 std::unique_ptr<TestPacketWriter> writer_; 1014 std::unique_ptr<TestPacketWriter> writer_;
1002 TestConnection connection_; 1015 TestConnection connection_;
1003 QuicPacketCreator* creator_; 1016 QuicPacketCreator* creator_;
1004 QuicPacketGenerator* generator_; 1017 QuicPacketGenerator* generator_;
1005 QuicSentPacketManager* manager_; 1018 QuicSentPacketManager* manager_;
1006 StrictMock<MockConnectionVisitor> visitor_; 1019 StrictMock<MockConnectionVisitor> visitor_;
1007 1020
1008 QuicStreamFrame frame1_; 1021 QuicStreamFrame frame1_;
1009 QuicStreamFrame frame2_; 1022 QuicStreamFrame frame2_;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 } 1074 }
1062 1075
1063 TEST_P(QuicConnectionTest, MaxPacketSize) { 1076 TEST_P(QuicConnectionTest, MaxPacketSize) {
1064 EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective()); 1077 EXPECT_EQ(Perspective::IS_CLIENT, connection_.perspective());
1065 EXPECT_EQ(1350u, connection_.max_packet_length()); 1078 EXPECT_EQ(1350u, connection_.max_packet_length());
1066 } 1079 }
1067 1080
1068 TEST_P(QuicConnectionTest, SmallerServerMaxPacketSize) { 1081 TEST_P(QuicConnectionTest, SmallerServerMaxPacketSize) {
1069 QuicConnectionId connection_id = 42; 1082 QuicConnectionId connection_id = 42;
1070 TestConnection connection(connection_id, kPeerAddress, helper_.get(), 1083 TestConnection connection(connection_id, kPeerAddress, helper_.get(),
1071 writer_.get(), Perspective::IS_SERVER, version()); 1084 alarm_factory_.get(), writer_.get(),
1085 Perspective::IS_SERVER, version());
1072 EXPECT_EQ(Perspective::IS_SERVER, connection.perspective()); 1086 EXPECT_EQ(Perspective::IS_SERVER, connection.perspective());
1073 EXPECT_EQ(1000u, connection.max_packet_length()); 1087 EXPECT_EQ(1000u, connection.max_packet_length());
1074 } 1088 }
1075 1089
1076 TEST_P(QuicConnectionTest, IncreaseServerMaxPacketSize) { 1090 TEST_P(QuicConnectionTest, IncreaseServerMaxPacketSize) {
1077 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); 1091 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
1078 1092
1079 connection_.set_perspective(Perspective::IS_SERVER); 1093 connection_.set_perspective(Perspective::IS_SERVER);
1080 connection_.SetMaxPacketLength(1000); 1094 connection_.SetMaxPacketLength(1000);
1081 1095
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 connection_.SetMaxPacketLength(kDefaultMaxPacketSize); 1163 connection_.SetMaxPacketLength(kDefaultMaxPacketSize);
1150 1164
1151 EXPECT_EQ(lower_max_packet_size, connection_.max_packet_length()); 1165 EXPECT_EQ(lower_max_packet_size, connection_.max_packet_length());
1152 } 1166 }
1153 1167
1154 TEST_P(QuicConnectionTest, LimitMaxPacketSizeByWriterForNewConnection) { 1168 TEST_P(QuicConnectionTest, LimitMaxPacketSizeByWriterForNewConnection) {
1155 const QuicConnectionId connection_id = 17; 1169 const QuicConnectionId connection_id = 17;
1156 const QuicByteCount lower_max_packet_size = 1240; 1170 const QuicByteCount lower_max_packet_size = 1240;
1157 writer_->set_max_packet_size(lower_max_packet_size); 1171 writer_->set_max_packet_size(lower_max_packet_size);
1158 TestConnection connection(connection_id, kPeerAddress, helper_.get(), 1172 TestConnection connection(connection_id, kPeerAddress, helper_.get(),
1159 writer_.get(), Perspective::IS_CLIENT, version()); 1173 alarm_factory_.get(), writer_.get(),
1174 Perspective::IS_CLIENT, version());
1160 EXPECT_EQ(Perspective::IS_CLIENT, connection.perspective()); 1175 EXPECT_EQ(Perspective::IS_CLIENT, connection.perspective());
1161 EXPECT_EQ(lower_max_packet_size, connection.max_packet_length()); 1176 EXPECT_EQ(lower_max_packet_size, connection.max_packet_length());
1162 } 1177 }
1163 1178
1164 TEST_P(QuicConnectionTest, PacketsInOrder) { 1179 TEST_P(QuicConnectionTest, PacketsInOrder) {
1165 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); 1180 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
1166 1181
1167 ProcessPacket(kDefaultPathId, 1); 1182 ProcessPacket(kDefaultPathId, 1);
1168 EXPECT_EQ(1u, outgoing_ack()->largest_observed); 1183 EXPECT_EQ(1u, outgoing_ack()->largest_observed);
1169 EXPECT_TRUE(outgoing_ack()->missing_packets.Empty()); 1184 EXPECT_TRUE(outgoing_ack()->missing_packets.Empty());
(...skipping 3334 matching lines...) Expand 10 before | Expand all | Expand 10 after
4504 new MockQuicConnectionDebugVisitor()); 4519 new MockQuicConnectionDebugVisitor());
4505 connection_.set_debug_visitor(debug_visitor.get()); 4520 connection_.set_debug_visitor(debug_visitor.get());
4506 EXPECT_CALL(*debug_visitor, OnPacketHeader(Ref(header))).Times(1); 4521 EXPECT_CALL(*debug_visitor, OnPacketHeader(Ref(header))).Times(1);
4507 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)).Times(1); 4522 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)).Times(1);
4508 EXPECT_CALL(*debug_visitor, OnSuccessfulVersionNegotiation(_)).Times(1); 4523 EXPECT_CALL(*debug_visitor, OnSuccessfulVersionNegotiation(_)).Times(1);
4509 connection_.OnPacketHeader(header); 4524 connection_.OnPacketHeader(header);
4510 } 4525 }
4511 4526
4512 TEST_P(QuicConnectionTest, Pacing) { 4527 TEST_P(QuicConnectionTest, Pacing) {
4513 TestConnection server(connection_id_, kSelfAddress, helper_.get(), 4528 TestConnection server(connection_id_, kSelfAddress, helper_.get(),
4514 writer_.get(), Perspective::IS_SERVER, version()); 4529 alarm_factory_.get(), writer_.get(),
4530 Perspective::IS_SERVER, version());
4515 TestConnection client(connection_id_, kPeerAddress, helper_.get(), 4531 TestConnection client(connection_id_, kPeerAddress, helper_.get(),
4516 writer_.get(), Perspective::IS_CLIENT, version()); 4532 alarm_factory_.get(), writer_.get(),
4533 Perspective::IS_CLIENT, version());
4517 EXPECT_FALSE(client.sent_packet_manager().using_pacing()); 4534 EXPECT_FALSE(client.sent_packet_manager().using_pacing());
4518 EXPECT_FALSE(server.sent_packet_manager().using_pacing()); 4535 EXPECT_FALSE(server.sent_packet_manager().using_pacing());
4519 } 4536 }
4520 4537
4521 TEST_P(QuicConnectionTest, WindowUpdateInstigateAcks) { 4538 TEST_P(QuicConnectionTest, WindowUpdateInstigateAcks) {
4522 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); 4539 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
4523 4540
4524 // Send a WINDOW_UPDATE frame. 4541 // Send a WINDOW_UPDATE frame.
4525 QuicWindowUpdateFrame window_update; 4542 QuicWindowUpdateFrame window_update;
4526 window_update.stream_id = 3; 4543 window_update.stream_id = 3;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
4699 EXPECT_CALL(visitor_, OnConnectionClosed(_, _, _)).Times(1); 4716 EXPECT_CALL(visitor_, OnConnectionClosed(_, _, _)).Times(1);
4700 connection_.CloseConnection(QUIC_NO_ERROR, "no reason", 4717 connection_.CloseConnection(QUIC_NO_ERROR, "no reason",
4701 ConnectionCloseBehavior::SILENT_CLOSE); 4718 ConnectionCloseBehavior::SILENT_CLOSE);
4702 connection_.CloseConnection(QUIC_NO_ERROR, "no reason", 4719 connection_.CloseConnection(QUIC_NO_ERROR, "no reason",
4703 ConnectionCloseBehavior::SILENT_CLOSE); 4720 ConnectionCloseBehavior::SILENT_CLOSE);
4704 } 4721 }
4705 4722
4706 } // namespace 4723 } // namespace
4707 } // namespace test 4724 } // namespace test
4708 } // namespace net 4725 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger_unittest.cc ('k') | net/quic/quic_crypto_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698