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" |
11 #include "net/quic/congestion_control/loss_detection_interface.h" | 11 #include "net/quic/congestion_control/loss_detection_interface.h" |
12 #include "net/quic/congestion_control/receive_algorithm_interface.h" | 12 #include "net/quic/congestion_control/receive_algorithm_interface.h" |
13 #include "net/quic/congestion_control/send_algorithm_interface.h" | 13 #include "net/quic/congestion_control/send_algorithm_interface.h" |
14 #include "net/quic/crypto/null_encrypter.h" | 14 #include "net/quic/crypto/null_encrypter.h" |
15 #include "net/quic/crypto/quic_decrypter.h" | 15 #include "net/quic/crypto/quic_decrypter.h" |
16 #include "net/quic/crypto/quic_encrypter.h" | 16 #include "net/quic/crypto/quic_encrypter.h" |
17 #include "net/quic/quic_flags.h" | 17 #include "net/quic/quic_flags.h" |
18 #include "net/quic/quic_protocol.h" | 18 #include "net/quic/quic_protocol.h" |
19 #include "net/quic/quic_utils.h" | 19 #include "net/quic/quic_utils.h" |
20 #include "net/quic/test_tools/mock_clock.h" | 20 #include "net/quic/test_tools/mock_clock.h" |
21 #include "net/quic/test_tools/mock_random.h" | 21 #include "net/quic/test_tools/mock_random.h" |
| 22 #include "net/quic/test_tools/quic_config_peer.h" |
22 #include "net/quic/test_tools/quic_connection_peer.h" | 23 #include "net/quic/test_tools/quic_connection_peer.h" |
23 #include "net/quic/test_tools/quic_framer_peer.h" | 24 #include "net/quic/test_tools/quic_framer_peer.h" |
24 #include "net/quic/test_tools/quic_packet_creator_peer.h" | 25 #include "net/quic/test_tools/quic_packet_creator_peer.h" |
25 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" | 26 #include "net/quic/test_tools/quic_sent_packet_manager_peer.h" |
26 #include "net/quic/test_tools/quic_test_utils.h" | 27 #include "net/quic/test_tools/quic_test_utils.h" |
27 #include "net/quic/test_tools/simple_quic_framer.h" | 28 #include "net/quic/test_tools/simple_quic_framer.h" |
28 #include "testing/gmock/include/gmock/gmock.h" | 29 #include "testing/gmock/include/gmock/gmock.h" |
29 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
30 | 31 |
31 using base::StringPiece; | 32 using base::StringPiece; |
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 // Now claim it's one, but set the ordering so it was sent "after" the first | 1307 // Now claim it's one, but set the ordering so it was sent "after" the first |
1307 // one. This should cause a connection error. | 1308 // one. This should cause a connection error. |
1308 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)); | 1309 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)); |
1309 peer_creator_.set_sequence_number(7); | 1310 peer_creator_.set_sequence_number(7); |
1310 EXPECT_CALL(visitor_, | 1311 EXPECT_CALL(visitor_, |
1311 OnConnectionClosed(QUIC_INVALID_STOP_WAITING_DATA, false)); | 1312 OnConnectionClosed(QUIC_INVALID_STOP_WAITING_DATA, false)); |
1312 QuicStopWaitingFrame frame3 = InitStopWaitingFrame(1); | 1313 QuicStopWaitingFrame frame3 = InitStopWaitingFrame(1); |
1313 ProcessStopWaitingPacket(&frame3); | 1314 ProcessStopWaitingPacket(&frame3); |
1314 } | 1315 } |
1315 | 1316 |
| 1317 TEST_P(QuicConnectionTest, TooManySentPackets) { |
| 1318 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); |
| 1319 |
| 1320 for (int i = 0; i < 1100; ++i) { |
| 1321 SendStreamDataToPeer(1, "foo", 3 * i, !kFin, nullptr); |
| 1322 } |
| 1323 |
| 1324 // Ack packet 1, which leaves more than the limit outstanding. |
| 1325 EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _)); |
| 1326 if (FLAGS_quic_too_many_outstanding_packets) { |
| 1327 EXPECT_CALL(visitor_, |
| 1328 OnConnectionClosed(QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS, |
| 1329 false)); |
| 1330 } |
| 1331 // We're receive buffer limited, so the connection won't try to write more. |
| 1332 EXPECT_CALL(visitor_, OnCanWrite()).Times(0); |
| 1333 |
| 1334 // Nack every packet except the last one, leaving a huge gap. |
| 1335 QuicAckFrame frame1 = InitAckFrame(1100); |
| 1336 for (QuicPacketSequenceNumber i = 1; i < 1100; ++i) { |
| 1337 NackPacket(i, &frame1); |
| 1338 } |
| 1339 ProcessAckPacket(&frame1); |
| 1340 } |
| 1341 |
| 1342 TEST_P(QuicConnectionTest, TooManyReceivedPackets) { |
| 1343 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); |
| 1344 |
| 1345 if (FLAGS_quic_too_many_outstanding_packets) { |
| 1346 EXPECT_CALL(visitor_, |
| 1347 OnConnectionClosed(QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS, |
| 1348 false)); |
| 1349 } |
| 1350 |
| 1351 // Miss every other packet for 1000 packets. |
| 1352 for (QuicPacketSequenceNumber i = 1; i < 1000; ++i) { |
| 1353 ProcessPacket(i * 2); |
| 1354 if (!connection_.connected()) { |
| 1355 break; |
| 1356 } |
| 1357 } |
| 1358 } |
| 1359 |
1316 TEST_P(QuicConnectionTest, LargestObservedLower) { | 1360 TEST_P(QuicConnectionTest, LargestObservedLower) { |
1317 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); | 1361 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); |
1318 | 1362 |
1319 SendStreamDataToPeer(1, "foo", 0, !kFin, nullptr); | 1363 SendStreamDataToPeer(1, "foo", 0, !kFin, nullptr); |
1320 SendStreamDataToPeer(1, "bar", 3, !kFin, nullptr); | 1364 SendStreamDataToPeer(1, "bar", 3, !kFin, nullptr); |
1321 SendStreamDataToPeer(1, "eep", 6, !kFin, nullptr); | 1365 SendStreamDataToPeer(1, "eep", 6, !kFin, nullptr); |
1322 EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _)); | 1366 EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _)); |
1323 | 1367 |
1324 // Start out saying the largest observed is 2. | 1368 // Start out saying the largest observed is 2. |
1325 QuicAckFrame frame1 = InitAckFrame(1); | 1369 QuicAckFrame frame1 = InitAckFrame(1); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1507 // All packets carry version info till version is negotiated. | 1551 // All packets carry version info till version is negotiated. |
1508 QuicPacketCreator* creator = | 1552 QuicPacketCreator* creator = |
1509 QuicConnectionPeer::GetPacketCreator(&connection_); | 1553 QuicConnectionPeer::GetPacketCreator(&connection_); |
1510 size_t payload_length; | 1554 size_t payload_length; |
1511 // GetPacketLengthForOneStream() assumes a stream offset of 0 in determining | 1555 // GetPacketLengthForOneStream() assumes a stream offset of 0 in determining |
1512 // packet length. The size of the offset field in a stream frame is 0 for | 1556 // packet length. The size of the offset field in a stream frame is 0 for |
1513 // offset 0, and 2 for non-zero offsets up through 64K. Increase | 1557 // offset 0, and 2 for non-zero offsets up through 64K. Increase |
1514 // max_packet_length by 2 so that subsequent packets containing subsequent | 1558 // max_packet_length by 2 so that subsequent packets containing subsequent |
1515 // stream frames with non-zero offets will fit within the packet length. | 1559 // stream frames with non-zero offets will fit within the packet length. |
1516 size_t length = 2 + GetPacketLengthForOneStream( | 1560 size_t length = 2 + GetPacketLengthForOneStream( |
1517 connection_.version(), kIncludeVersion, PACKET_1BYTE_SEQUENCE_NUMBER, | 1561 connection_.version(), kIncludeVersion, |
| 1562 PACKET_8BYTE_CONNECTION_ID, PACKET_1BYTE_SEQUENCE_NUMBER, |
1518 IN_FEC_GROUP, &payload_length); | 1563 IN_FEC_GROUP, &payload_length); |
1519 creator->set_max_packet_length(length); | 1564 creator->set_max_packet_length(length); |
1520 | 1565 |
1521 // Send 4 protected data packets, which should also trigger 1 FEC packet. | 1566 // Send 4 protected data packets, which should also trigger 1 FEC packet. |
1522 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(5); | 1567 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(5); |
1523 // The first stream frame will have 2 fewer overhead bytes than the other 3. | 1568 // The first stream frame will have 2 fewer overhead bytes than the other 3. |
1524 const string payload(payload_length * 4 + 2, 'a'); | 1569 const string payload(payload_length * 4 + 2, 'a'); |
1525 connection_.SendStreamDataWithStringWithFec(1, payload, 0, !kFin, nullptr); | 1570 connection_.SendStreamDataWithStringWithFec(1, payload, 0, !kFin, nullptr); |
1526 // Expect the FEC group to be closed after SendStreamDataWithString. | 1571 // Expect the FEC group to be closed after SendStreamDataWithString. |
1527 EXPECT_FALSE(creator->IsFecGroupOpen()); | 1572 EXPECT_FALSE(creator->IsFecGroupOpen()); |
1528 EXPECT_FALSE(creator->IsFecProtected()); | 1573 EXPECT_FALSE(creator->IsFecProtected()); |
1529 } | 1574 } |
1530 | 1575 |
1531 TEST_P(QuicConnectionTest, FECQueueing) { | 1576 TEST_P(QuicConnectionTest, FECQueueing) { |
1532 // All packets carry version info till version is negotiated. | 1577 // All packets carry version info till version is negotiated. |
1533 size_t payload_length; | 1578 size_t payload_length; |
1534 QuicPacketCreator* creator = | 1579 QuicPacketCreator* creator = |
1535 QuicConnectionPeer::GetPacketCreator(&connection_); | 1580 QuicConnectionPeer::GetPacketCreator(&connection_); |
1536 size_t length = GetPacketLengthForOneStream( | 1581 size_t length = GetPacketLengthForOneStream( |
1537 connection_.version(), kIncludeVersion, PACKET_1BYTE_SEQUENCE_NUMBER, | 1582 connection_.version(), kIncludeVersion, |
| 1583 PACKET_8BYTE_CONNECTION_ID, PACKET_1BYTE_SEQUENCE_NUMBER, |
1538 IN_FEC_GROUP, &payload_length); | 1584 IN_FEC_GROUP, &payload_length); |
1539 creator->set_max_packet_length(length); | 1585 creator->set_max_packet_length(length); |
1540 EXPECT_TRUE(creator->IsFecEnabled()); | 1586 EXPECT_TRUE(creator->IsFecEnabled()); |
1541 | 1587 |
1542 EXPECT_EQ(0u, connection_.NumQueuedPackets()); | 1588 EXPECT_EQ(0u, connection_.NumQueuedPackets()); |
1543 BlockOnNextWrite(); | 1589 BlockOnNextWrite(); |
1544 const string payload(payload_length, 'a'); | 1590 const string payload(payload_length, 'a'); |
1545 connection_.SendStreamDataWithStringWithFec(1, payload, 0, !kFin, nullptr); | 1591 connection_.SendStreamDataWithStringWithFec(1, payload, 0, !kFin, nullptr); |
1546 EXPECT_FALSE(creator->IsFecGroupOpen()); | 1592 EXPECT_FALSE(creator->IsFecGroupOpen()); |
1547 EXPECT_FALSE(creator->IsFecProtected()); | 1593 EXPECT_FALSE(creator->IsFecProtected()); |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2899 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, 1, _, _)).Times(0); | 2945 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, 1, _, _)).Times(0); |
2900 connection_.SendPacket( | 2946 connection_.SendPacket( |
2901 ENCRYPTION_NONE, 1, packet, kTestEntropyHash, HAS_RETRANSMITTABLE_DATA); | 2947 ENCRYPTION_NONE, 1, packet, kTestEntropyHash, HAS_RETRANSMITTABLE_DATA); |
2902 EXPECT_EQ(1u, connection_.NumQueuedPackets()); | 2948 EXPECT_EQ(1u, connection_.NumQueuedPackets()); |
2903 } | 2949 } |
2904 | 2950 |
2905 TEST_P(QuicConnectionTest, TestQueueLimitsOnSendStreamData) { | 2951 TEST_P(QuicConnectionTest, TestQueueLimitsOnSendStreamData) { |
2906 // All packets carry version info till version is negotiated. | 2952 // All packets carry version info till version is negotiated. |
2907 size_t payload_length; | 2953 size_t payload_length; |
2908 size_t length = GetPacketLengthForOneStream( | 2954 size_t length = GetPacketLengthForOneStream( |
2909 connection_.version(), kIncludeVersion, PACKET_1BYTE_SEQUENCE_NUMBER, | 2955 connection_.version(), kIncludeVersion, |
| 2956 PACKET_8BYTE_CONNECTION_ID, PACKET_1BYTE_SEQUENCE_NUMBER, |
2910 NOT_IN_FEC_GROUP, &payload_length); | 2957 NOT_IN_FEC_GROUP, &payload_length); |
2911 QuicConnectionPeer::GetPacketCreator(&connection_)->set_max_packet_length( | 2958 QuicConnectionPeer::GetPacketCreator(&connection_)->set_max_packet_length( |
2912 length); | 2959 length); |
2913 | 2960 |
2914 // Queue the first packet. | 2961 // Queue the first packet. |
2915 EXPECT_CALL(*send_algorithm_, | 2962 EXPECT_CALL(*send_algorithm_, |
2916 TimeUntilSend(_, _, _)).WillOnce( | 2963 TimeUntilSend(_, _, _)).WillOnce( |
2917 testing::Return(QuicTime::Delta::FromMicroseconds(10))); | 2964 testing::Return(QuicTime::Delta::FromMicroseconds(10))); |
2918 const string payload(payload_length, 'a'); | 2965 const string payload(payload_length, 'a'); |
2919 EXPECT_EQ(0u, connection_.SendStreamDataWithString(3, payload, 0, !kFin, | 2966 EXPECT_EQ(0u, connection_.SendStreamDataWithString(3, payload, 0, !kFin, |
2920 nullptr).bytes_consumed); | 2967 nullptr).bytes_consumed); |
2921 EXPECT_EQ(0u, connection_.NumQueuedPackets()); | 2968 EXPECT_EQ(0u, connection_.NumQueuedPackets()); |
2922 } | 2969 } |
2923 | 2970 |
2924 TEST_P(QuicConnectionTest, LoopThroughSendingPackets) { | 2971 TEST_P(QuicConnectionTest, LoopThroughSendingPackets) { |
2925 // All packets carry version info till version is negotiated. | 2972 // All packets carry version info till version is negotiated. |
2926 size_t payload_length; | 2973 size_t payload_length; |
2927 // GetPacketLengthForOneStream() assumes a stream offset of 0 in determining | 2974 // GetPacketLengthForOneStream() assumes a stream offset of 0 in determining |
2928 // packet length. The size of the offset field in a stream frame is 0 for | 2975 // packet length. The size of the offset field in a stream frame is 0 for |
2929 // offset 0, and 2 for non-zero offsets up through 16K. Increase | 2976 // offset 0, and 2 for non-zero offsets up through 16K. Increase |
2930 // max_packet_length by 2 so that subsequent packets containing subsequent | 2977 // max_packet_length by 2 so that subsequent packets containing subsequent |
2931 // stream frames with non-zero offets will fit within the packet length. | 2978 // stream frames with non-zero offets will fit within the packet length. |
2932 size_t length = 2 + GetPacketLengthForOneStream( | 2979 size_t length = 2 + GetPacketLengthForOneStream( |
2933 connection_.version(), kIncludeVersion, PACKET_1BYTE_SEQUENCE_NUMBER, | 2980 connection_.version(), kIncludeVersion, |
| 2981 PACKET_8BYTE_CONNECTION_ID, PACKET_1BYTE_SEQUENCE_NUMBER, |
2934 NOT_IN_FEC_GROUP, &payload_length); | 2982 NOT_IN_FEC_GROUP, &payload_length); |
2935 QuicConnectionPeer::GetPacketCreator(&connection_)->set_max_packet_length( | 2983 QuicConnectionPeer::GetPacketCreator(&connection_)->set_max_packet_length( |
2936 length); | 2984 length); |
2937 | 2985 |
2938 // Queue the first packet. | 2986 // Queue the first packet. |
2939 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(7); | 2987 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(7); |
2940 // The first stream frame will have 2 fewer overhead bytes than the other six. | 2988 // The first stream frame will have 2 fewer overhead bytes than the other six. |
2941 const string payload(payload_length * 7 + 2, 'a'); | 2989 const string payload(payload_length * 7 + 2, 'a'); |
2942 EXPECT_EQ(payload.size(), | 2990 EXPECT_EQ(payload.size(), |
2943 connection_.SendStreamDataWithString(1, payload, 0, !kFin, nullptr) | 2991 connection_.SendStreamDataWithString(1, payload, 0, !kFin, nullptr) |
2944 .bytes_consumed); | 2992 .bytes_consumed); |
2945 } | 2993 } |
2946 | 2994 |
| 2995 TEST_P(QuicConnectionTest, LoopThroughSendingPacketsWithTruncation) { |
| 2996 ValueRestore<bool> old_flag(&FLAGS_allow_truncated_connection_ids_for_quic, |
| 2997 true); |
| 2998 |
| 2999 // Set up a larger payload than will fit in one packet. |
| 3000 const string payload(connection_.max_packet_length(), 'a'); |
| 3001 EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber()); |
| 3002 |
| 3003 // Now send some packets with no truncation. |
| 3004 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2); |
| 3005 EXPECT_EQ(payload.size(), |
| 3006 connection_.SendStreamDataWithString( |
| 3007 3, payload, 0, !kFin, nullptr).bytes_consumed); |
| 3008 // Track the size of the second packet here. The overhead will be the largest |
| 3009 // we see in this test, due to the non-truncated CID. |
| 3010 size_t non_truncated_packet_size = writer_->last_packet_size(); |
| 3011 |
| 3012 // Change to a 4 byte CID. |
| 3013 QuicConfig config; |
| 3014 QuicConfigPeer::SetReceivedBytesForConnectionId(&config, 4); |
| 3015 connection_.SetFromConfig(config); |
| 3016 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2); |
| 3017 EXPECT_EQ(payload.size(), |
| 3018 connection_.SendStreamDataWithString( |
| 3019 3, payload, 0, !kFin, nullptr).bytes_consumed); |
| 3020 // Verify that we have 8 fewer bytes than in the non-truncated case. The |
| 3021 // first packet got 4 bytes of extra payload due to the truncation, and the |
| 3022 // headers here are also 4 byte smaller. |
| 3023 EXPECT_EQ(non_truncated_packet_size, writer_->last_packet_size() + 8); |
| 3024 |
| 3025 |
| 3026 // Change to a 1 byte CID. |
| 3027 QuicConfigPeer::SetReceivedBytesForConnectionId(&config, 1); |
| 3028 connection_.SetFromConfig(config); |
| 3029 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2); |
| 3030 EXPECT_EQ(payload.size(), |
| 3031 connection_.SendStreamDataWithString( |
| 3032 3, payload, 0, !kFin, nullptr).bytes_consumed); |
| 3033 // Just like above, we save 7 bytes on payload, and 7 on truncation. |
| 3034 EXPECT_EQ(non_truncated_packet_size, writer_->last_packet_size() + 7 * 2); |
| 3035 |
| 3036 // Change to a 0 byte CID. |
| 3037 QuicConfigPeer::SetReceivedBytesForConnectionId(&config, 0); |
| 3038 connection_.SetFromConfig(config); |
| 3039 EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(2); |
| 3040 EXPECT_EQ(payload.size(), |
| 3041 connection_.SendStreamDataWithString( |
| 3042 3, payload, 0, !kFin, nullptr).bytes_consumed); |
| 3043 // Just like above, we save 8 bytes on payload, and 8 on truncation. |
| 3044 EXPECT_EQ(non_truncated_packet_size, writer_->last_packet_size() + 8 * 2); |
| 3045 } |
| 3046 |
2947 TEST_P(QuicConnectionTest, SendDelayedAck) { | 3047 TEST_P(QuicConnectionTest, SendDelayedAck) { |
2948 QuicTime ack_time = clock_.ApproximateNow().Add(DefaultDelayedAckTime()); | 3048 QuicTime ack_time = clock_.ApproximateNow().Add(DefaultDelayedAckTime()); |
2949 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); | 3049 EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_)); |
2950 EXPECT_FALSE(connection_.GetAckAlarm()->IsSet()); | 3050 EXPECT_FALSE(connection_.GetAckAlarm()->IsSet()); |
2951 const uint8 tag = 0x07; | 3051 const uint8 tag = 0x07; |
2952 connection_.SetDecrypter(new StrictTaggingDecrypter(tag), | 3052 connection_.SetDecrypter(new StrictTaggingDecrypter(tag), |
2953 ENCRYPTION_INITIAL); | 3053 ENCRYPTION_INITIAL); |
2954 framer_.SetEncrypter(ENCRYPTION_INITIAL, new TaggingEncrypter(tag)); | 3054 framer_.SetEncrypter(ENCRYPTION_INITIAL, new TaggingEncrypter(tag)); |
2955 // Process a packet from the non-crypto stream. | 3055 // Process a packet from the non-crypto stream. |
2956 frame1_.stream_id = 3; | 3056 frame1_.stream_id = 3; |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4007 QuicBlockedFrame blocked; | 4107 QuicBlockedFrame blocked; |
4008 blocked.stream_id = 3; | 4108 blocked.stream_id = 3; |
4009 EXPECT_CALL(visitor_, OnBlockedFrames(_)); | 4109 EXPECT_CALL(visitor_, OnBlockedFrames(_)); |
4010 ProcessFramePacket(QuicFrame(&blocked)); | 4110 ProcessFramePacket(QuicFrame(&blocked)); |
4011 EXPECT_TRUE(ack_alarm->IsSet()); | 4111 EXPECT_TRUE(ack_alarm->IsSet()); |
4012 } | 4112 } |
4013 | 4113 |
4014 } // namespace | 4114 } // namespace |
4015 } // namespace test | 4115 } // namespace test |
4016 } // namespace net | 4116 } // namespace net |
OLD | NEW |