| 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 2656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2667 EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _)); | 2667 EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _)); |
| 2668 ProcessAckPacket(&frame); | 2668 ProcessAckPacket(&frame); |
| 2669 EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); | 2669 EXPECT_TRUE(connection_.GetPingAlarm()->IsSet()); |
| 2670 EXPECT_EQ(clock_.ApproximateNow().Add(QuicTime::Delta::FromSeconds(15)), | 2670 EXPECT_EQ(clock_.ApproximateNow().Add(QuicTime::Delta::FromSeconds(15)), |
| 2671 connection_.GetPingAlarm()->deadline()); | 2671 connection_.GetPingAlarm()->deadline()); |
| 2672 | 2672 |
| 2673 writer_->Reset(); | 2673 writer_->Reset(); |
| 2674 clock_.AdvanceTime(QuicTime::Delta::FromSeconds(15)); | 2674 clock_.AdvanceTime(QuicTime::Delta::FromSeconds(15)); |
| 2675 connection_.GetPingAlarm()->Fire(); | 2675 connection_.GetPingAlarm()->Fire(); |
| 2676 EXPECT_EQ(1u, writer_->frame_count()); | 2676 EXPECT_EQ(1u, writer_->frame_count()); |
| 2677 if (version() > QUIC_VERSION_17) { | 2677 if (version() >= QUIC_VERSION_18) { |
| 2678 ASSERT_EQ(1u, writer_->ping_frames().size()); | 2678 ASSERT_EQ(1u, writer_->ping_frames().size()); |
| 2679 } else { | 2679 } else { |
| 2680 ASSERT_EQ(1u, writer_->stream_frames().size()); | 2680 ASSERT_EQ(1u, writer_->stream_frames().size()); |
| 2681 EXPECT_EQ(kCryptoStreamId, writer_->stream_frames()[0].stream_id); | 2681 EXPECT_EQ(kCryptoStreamId, writer_->stream_frames()[0].stream_id); |
| 2682 EXPECT_EQ(0u, writer_->stream_frames()[0].offset); | 2682 EXPECT_EQ(0u, writer_->stream_frames()[0].offset); |
| 2683 } | 2683 } |
| 2684 writer_->Reset(); | 2684 writer_->Reset(); |
| 2685 | 2685 |
| 2686 EXPECT_CALL(visitor_, HasOpenDataStreams()).WillRepeatedly(Return(false)); | 2686 EXPECT_CALL(visitor_, HasOpenDataStreams()).WillRepeatedly(Return(false)); |
| 2687 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); | 2687 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5)); |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4026 QuicBlockedFrame blocked; | 4026 QuicBlockedFrame blocked; |
| 4027 blocked.stream_id = 3; | 4027 blocked.stream_id = 3; |
| 4028 EXPECT_CALL(visitor_, OnBlockedFrames(_)); | 4028 EXPECT_CALL(visitor_, OnBlockedFrames(_)); |
| 4029 ProcessFramePacket(QuicFrame(&blocked)); | 4029 ProcessFramePacket(QuicFrame(&blocked)); |
| 4030 EXPECT_TRUE(ack_alarm->IsSet()); | 4030 EXPECT_TRUE(ack_alarm->IsSet()); |
| 4031 } | 4031 } |
| 4032 | 4032 |
| 4033 } // namespace | 4033 } // namespace |
| 4034 } // namespace test | 4034 } // namespace test |
| 4035 } // namespace net | 4035 } // namespace net |
| OLD | NEW |