| OLD | NEW |
| 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 }; | 408 }; |
| 409 | 409 |
| 410 class TestConnection : public QuicConnection { | 410 class TestConnection : public QuicConnection { |
| 411 public: | 411 public: |
| 412 TestConnection(QuicConnectionId connection_id, | 412 TestConnection(QuicConnectionId connection_id, |
| 413 IPEndPoint address, | 413 IPEndPoint address, |
| 414 TestConnectionHelper* helper, | 414 TestConnectionHelper* helper, |
| 415 TestPacketWriter* writer, | 415 TestPacketWriter* writer, |
| 416 bool is_server, | 416 bool is_server, |
| 417 QuicVersion version) | 417 QuicVersion version) |
| 418 : QuicConnection(connection_id, address, helper, writer, is_server, | 418 : QuicConnection(connection_id, |
| 419 address, |
| 420 helper, |
| 421 writer, |
| 422 false /* owns_writer */, |
| 423 is_server, |
| 419 SupportedVersions(version)), | 424 SupportedVersions(version)), |
| 420 writer_(writer) { | 425 writer_(writer) { |
| 421 // Disable tail loss probes for most tests. | 426 // Disable tail loss probes for most tests. |
| 422 QuicSentPacketManagerPeer::SetMaxTailLossProbes( | 427 QuicSentPacketManagerPeer::SetMaxTailLossProbes( |
| 423 QuicConnectionPeer::GetSentPacketManager(this), 0); | 428 QuicConnectionPeer::GetSentPacketManager(this), 0); |
| 424 writer_->set_is_server(is_server); | 429 writer_->set_is_server(is_server); |
| 425 } | 430 } |
| 426 | 431 |
| 427 void SendAck() { | 432 void SendAck() { |
| 428 QuicConnectionPeer::SendAck(this); | 433 QuicConnectionPeer::SendAck(this); |
| (...skipping 3627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4056 QuicBlockedFrame blocked; | 4061 QuicBlockedFrame blocked; |
| 4057 blocked.stream_id = 3; | 4062 blocked.stream_id = 3; |
| 4058 EXPECT_CALL(visitor_, OnBlockedFrames(_)); | 4063 EXPECT_CALL(visitor_, OnBlockedFrames(_)); |
| 4059 ProcessFramePacket(QuicFrame(&blocked)); | 4064 ProcessFramePacket(QuicFrame(&blocked)); |
| 4060 EXPECT_TRUE(ack_alarm->IsSet()); | 4065 EXPECT_TRUE(ack_alarm->IsSet()); |
| 4061 } | 4066 } |
| 4062 | 4067 |
| 4063 } // namespace | 4068 } // namespace |
| 4064 } // namespace test | 4069 } // namespace test |
| 4065 } // namespace net | 4070 } // namespace net |
| OLD | NEW |