Chromium Code Reviews| 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 <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 5231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5242 | 5242 |
| 5243 TEST_P(QuicConnectionTest, DoNotSendGoAwayTwice) { | 5243 TEST_P(QuicConnectionTest, DoNotSendGoAwayTwice) { |
| 5244 EXPECT_FALSE(connection_.goaway_sent()); | 5244 EXPECT_FALSE(connection_.goaway_sent()); |
| 5245 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1); | 5245 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1); |
| 5246 connection_.SendGoAway(QUIC_PEER_GOING_AWAY, kHeadersStreamId, "Going Away."); | 5246 connection_.SendGoAway(QUIC_PEER_GOING_AWAY, kHeadersStreamId, "Going Away."); |
| 5247 EXPECT_TRUE(connection_.goaway_sent()); | 5247 EXPECT_TRUE(connection_.goaway_sent()); |
| 5248 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0); | 5248 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0); |
| 5249 connection_.SendGoAway(QUIC_PEER_GOING_AWAY, kHeadersStreamId, "Going Away."); | 5249 connection_.SendGoAway(QUIC_PEER_GOING_AWAY, kHeadersStreamId, "Going Away."); |
| 5250 } | 5250 } |
| 5251 | 5251 |
| 5252 TEST_P(QuicConnectionTest, ReevaluateTimeUntilSendOnAck) { | 5252 TEST_P(QuicConnectionTest, DISABLED_ReevaluateTimeUntilSendOnAck) { |
|
Ryan Hamilton
2015/11/21 22:19:00
This does not appear to be part of the original CL
ianswett
2015/11/23 20:03:15
Done.
| |
| 5253 FLAGS_quic_respect_send_alarm = true; | 5253 FLAGS_quic_respect_send_alarm = true; |
| 5254 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); | 5254 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); |
| 5255 connection_.SendStreamDataWithString(kClientDataStreamId1, "foo", 0, !kFin, | 5255 connection_.SendStreamDataWithString(kClientDataStreamId1, "foo", 0, !kFin, |
| 5256 nullptr); | 5256 nullptr); |
| 5257 | 5257 |
| 5258 // Evaluate CanWrite, and have it return a non-Zero value. | 5258 // Evaluate CanWrite, and have it return a non-Zero value. |
| 5259 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _, _)) | 5259 EXPECT_CALL(*send_algorithm_, TimeUntilSend(_, _, _)) |
| 5260 .WillRepeatedly(Return(QuicTime::Delta::FromMilliseconds(1))); | 5260 .WillRepeatedly(Return(QuicTime::Delta::FromMilliseconds(1))); |
| 5261 connection_.OnCanWrite(); | 5261 connection_.OnCanWrite(); |
| 5262 EXPECT_TRUE(connection_.GetSendAlarm()->IsSet()); | 5262 EXPECT_TRUE(connection_.GetSendAlarm()->IsSet()); |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 5274 EXPECT_EQ(1u, writer_->stream_frames().size()); | 5274 EXPECT_EQ(1u, writer_->stream_frames().size()); |
| 5275 EXPECT_TRUE(connection_.GetSendAlarm()->IsSet()); | 5275 EXPECT_TRUE(connection_.GetSendAlarm()->IsSet()); |
| 5276 EXPECT_EQ(clock_.Now().Add(QuicTime::Delta::FromMilliseconds(2)), | 5276 EXPECT_EQ(clock_.Now().Add(QuicTime::Delta::FromMilliseconds(2)), |
| 5277 connection_.GetSendAlarm()->deadline()); | 5277 connection_.GetSendAlarm()->deadline()); |
| 5278 writer_->Reset(); | 5278 writer_->Reset(); |
| 5279 } | 5279 } |
| 5280 | 5280 |
| 5281 } // namespace | 5281 } // namespace |
| 5282 } // namespace test | 5282 } // namespace test |
| 5283 } // namespace net | 5283 } // namespace net |
| OLD | NEW |