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

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

Issue 1459343009: Make QuicPacketCreator be able to serialize packet itself when it does not have room for next strea… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@107733506
Patch Set: Created 5 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 | « no previous file | net/quic/quic_packet_creator.h » ('j') | net/tools/quic/quic_server_bin.cc » ('J')
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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 return params; 669 return params;
670 } 670 }
671 671
672 class QuicConnectionTest : public ::testing::TestWithParam<TestParams> { 672 class QuicConnectionTest : public ::testing::TestWithParam<TestParams> {
673 protected: 673 protected:
674 QuicConnectionTest() 674 QuicConnectionTest()
675 : connection_id_(42), 675 : connection_id_(42),
676 framer_(SupportedVersions(version()), 676 framer_(SupportedVersions(version()),
677 QuicTime::Zero(), 677 QuicTime::Zero(),
678 Perspective::IS_CLIENT), 678 Perspective::IS_CLIENT),
679 peer_creator_(connection_id_, &framer_, &random_generator_), 679 peer_creator_(connection_id_,
680 &framer_,
681 &random_generator_,
682 /*delegate=*/nullptr),
680 send_algorithm_(new StrictMock<MockSendAlgorithm>), 683 send_algorithm_(new StrictMock<MockSendAlgorithm>),
681 loss_algorithm_(new MockLossAlgorithm()), 684 loss_algorithm_(new MockLossAlgorithm()),
682 helper_(new TestConnectionHelper(&clock_, &random_generator_)), 685 helper_(new TestConnectionHelper(&clock_, &random_generator_)),
683 writer_(new TestPacketWriter(version(), &clock_)), 686 writer_(new TestPacketWriter(version(), &clock_)),
684 factory_(writer_.get()), 687 factory_(writer_.get()),
685 connection_(connection_id_, 688 connection_(connection_id_,
686 kPeerAddress, 689 kPeerAddress,
687 helper_.get(), 690 helper_.get(),
688 factory_, 691 factory_,
689 Perspective::IS_CLIENT, 692 Perspective::IS_CLIENT,
(...skipping 4584 matching lines...) Expand 10 before | Expand all | Expand 10 after
5274 EXPECT_EQ(1u, writer_->stream_frames().size()); 5277 EXPECT_EQ(1u, writer_->stream_frames().size());
5275 EXPECT_TRUE(connection_.GetSendAlarm()->IsSet()); 5278 EXPECT_TRUE(connection_.GetSendAlarm()->IsSet());
5276 EXPECT_EQ(clock_.Now().Add(QuicTime::Delta::FromMilliseconds(2)), 5279 EXPECT_EQ(clock_.Now().Add(QuicTime::Delta::FromMilliseconds(2)),
5277 connection_.GetSendAlarm()->deadline()); 5280 connection_.GetSendAlarm()->deadline());
5278 writer_->Reset(); 5281 writer_->Reset();
5279 } 5282 }
5280 5283
5281 } // namespace 5284 } // namespace
5282 } // namespace test 5285 } // namespace test
5283 } // namespace net 5286 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_packet_creator.h » ('j') | net/tools/quic/quic_server_bin.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698