diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-18 23:54:36 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-18 23:54:36 +0000 |
commit | 4d1789c3b13f6d4eff349e0584c694419eb1924b (patch) | |
tree | 4de8983053504d42fe8fb95daf8bd2f574e64f3c /net/tools/quic/quic_epoll_connection_helper_test.cc | |
parent | 2bac93263cf5402e7f8c55ebf3ad472e8dcf5139 (diff) | |
download | chromium_src-4d1789c3b13f6d4eff349e0584c694419eb1924b.zip chromium_src-4d1789c3b13f6d4eff349e0584c694419eb1924b.tar.gz chromium_src-4d1789c3b13f6d4eff349e0584c694419eb1924b.tar.bz2 |
Land Recent QUIC changes.
Added a DCHECK that ProcessRawData will not be called with zero data length.
Merge internal change: 52068687
Removed reinterpret_cast<QuicFecBuilderInterface*>. Minor comment fix.
Merge internal change: 52051673
Replace QuicConnectionVisitorInterface::OnPacket with OnStreamFrames
Merge internal change: 52049491
Remove unused OnAck method from QuicConnectionVisitorInterface.
This is a bit of an abstraction violation, since nothing above
the Connection knows about packets. The AckNotifier interface
provides the "right" abstraction.
Merge internal change: 52027657
Add state to session to indicate that a crypto stream is blocked, so
that we can properly set the IS_HANDSHAKE argument when asking the
congestion manager if we CanWrite().
Merge internal change: 51983405
Break out the tracking of sent packet from QuicConnection to a new
QuicSentPacketManager class.
Merge internal change: 51969314
Delay the RTO every time an ack is received, per TCP RTO spec.
Merge internal change: 51954312
Sending ConnectionClose frames via the PacketGenerator so they get
properly queued if they cannot be sent immediately. Prevents multiple
different connection close packets from being sent, a potential
infinite loop, and from dropping connection close packets which can't
be sent due to a write block from being dropped entirely.
Merge internal change: 51890780
Increse the default max_tcp_congestion_window to 100 from 50, now that
the RTO has been increased to the TCP standard of 60 seconds.
Merge internal change: 51854728
Added large (1 Mb) POST tests.
Verified that without the fix from cl/51829697 these tests timeout due
to receiver cwnd dropping to zero after sending ACKs.
Merge internal change: 51854636
Refactored and replaced SendStreamAndNotifyWhenAck() to work with
SendvStreamData().
Merge internal change: 51848330
Remove unused client2 scoped_ptrs from end_to_end_tests
Merge internal change: 51835589
R=rch@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23691073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools/quic/quic_epoll_connection_helper_test.cc')
-rw-r--r-- | net/tools/quic/quic_epoll_connection_helper_test.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/net/tools/quic/quic_epoll_connection_helper_test.cc b/net/tools/quic/quic_epoll_connection_helper_test.cc index 9f0321a..636d98f 100644 --- a/net/tools/quic/quic_epoll_connection_helper_test.cc +++ b/net/tools/quic/quic_epoll_connection_helper_test.cc @@ -8,6 +8,7 @@ #include "net/quic/crypto/quic_decrypter.h" #include "net/quic/crypto/quic_encrypter.h" #include "net/quic/crypto/quic_random.h" +#include "net/quic/quic_connection.h" #include "net/quic/quic_framer.h" #include "net/quic/test_tools/quic_connection_peer.h" #include "net/quic/test_tools/quic_test_utils.h" @@ -21,6 +22,7 @@ using net::test::QuicConnectionPeer; using net::test::MockConnectionVisitor; using net::tools::test::MockEpollServer; using testing::_; +using testing::AnyNumber; using testing::Return; namespace net { @@ -154,7 +156,10 @@ TEST_F(QuicEpollConnectionHelperTest, DISABLED_TestRetransmission) { TEST_F(QuicEpollConnectionHelperTest, InitialTimeout) { EXPECT_TRUE(connection_.connected()); - EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, NOT_RETRANSMISSION, _)); + EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, NOT_RETRANSMISSION, + HAS_RETRANSMITTABLE_DATA)); + EXPECT_CALL(*send_algorithm_, RetransmissionDelay()).WillOnce( + Return(QuicTime::Delta::FromMicroseconds(1))); EXPECT_CALL(visitor_, ConnectionClose(QUIC_CONNECTION_TIMED_OUT, !kFromPeer)); epoll_server_.WaitForEventsAndExecuteCallbacks(); EXPECT_FALSE(connection_.connected()); @@ -182,8 +187,10 @@ TEST_F(QuicEpollConnectionHelperTest, TimeoutAfterSend) { // This time, we should time out. EXPECT_CALL(visitor_, ConnectionClose(QUIC_CONNECTION_TIMED_OUT, !kFromPeer)); - EXPECT_CALL(*send_algorithm_, - SentPacket(_, 2, _, NOT_RETRANSMISSION, NO_RETRANSMITTABLE_DATA)); + EXPECT_CALL(*send_algorithm_, SentPacket(_, 2, _, NOT_RETRANSMISSION, + HAS_RETRANSMITTABLE_DATA)); + EXPECT_CALL(*send_algorithm_, RetransmissionDelay()).WillOnce( + Return(QuicTime::Delta::FromMicroseconds(1))); epoll_server_.WaitForEventsAndExecuteCallbacks(); EXPECT_EQ(kDefaultInitialTimeoutSecs * 1000000 + 5000, epoll_server_.NowInUsec()); @@ -199,7 +206,8 @@ TEST_F(QuicEpollConnectionHelperTest, SendSchedulerDelayThenSend) { *send_algorithm_, TimeUntilSend(_, NOT_RETRANSMISSION, _, _)).WillOnce( Return(QuicTime::Delta::FromMicroseconds(1))); connection_.SendOrQueuePacket(ENCRYPTION_NONE, 1, packet, 0, - HAS_RETRANSMITTABLE_DATA); + HAS_RETRANSMITTABLE_DATA, + QuicConnection::NO_FORCE); EXPECT_CALL(*send_algorithm_, SentPacket(_, 1, _, NOT_RETRANSMISSION, _)); EXPECT_EQ(1u, connection_.NumQueuedPackets()); @@ -210,6 +218,7 @@ TEST_F(QuicEpollConnectionHelperTest, SendSchedulerDelayThenSend) { TimeUntilSend(_, NOT_RETRANSMISSION, _, _)).WillRepeatedly( Return(QuicTime::Delta::Zero())); EXPECT_CALL(visitor_, OnCanWrite()).WillOnce(Return(true)); + EXPECT_CALL(visitor_, HasPendingHandshake()).Times(AnyNumber()); epoll_server_.AdvanceByAndCallCallbacks(1); EXPECT_EQ(0u, connection_.NumQueuedPackets()); } |