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/tools/quic/quic_dispatcher.h" | 5 #include "net/tools/quic/quic_dispatcher.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <ostream> | 8 #include <ostream> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 // A packet whose packet number is one to large to be allowed to start a | 527 // A packet whose packet number is one to large to be allowed to start a |
528 // connection. | 528 // connection. |
529 ProcessPacket(client_address, connection_id, true, SerializeCHLO(), | 529 ProcessPacket(client_address, connection_id, true, SerializeCHLO(), |
530 PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER, | 530 PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER, |
531 QuicDispatcher::kMaxReasonableInitialPacketNumber + 1); | 531 QuicDispatcher::kMaxReasonableInitialPacketNumber + 1); |
532 } | 532 } |
533 | 533 |
534 TEST_F(QuicDispatcherTest, SupportedVersionsChangeInFlight) { | 534 TEST_F(QuicDispatcherTest, SupportedVersionsChangeInFlight) { |
535 static_assert(arraysize(kSupportedQuicVersions) == 5u, | 535 static_assert(arraysize(kSupportedQuicVersions) == 5u, |
536 "Supported versions out of sync"); | 536 "Supported versions out of sync"); |
537 FLAGS_quic_reloadable_flag_quic_enable_version_37 = true; | |
538 FLAGS_quic_reloadable_flag_quic_enable_version_38 = true; | 537 FLAGS_quic_reloadable_flag_quic_enable_version_38 = true; |
539 base::SetFlag(&FLAGS_quic_enable_version_39, true); | 538 base::SetFlag(&FLAGS_quic_enable_version_39, true); |
540 QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1); | 539 QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1); |
541 server_address_ = QuicSocketAddress(QuicIpAddress::Any4(), 5); | 540 server_address_ = QuicSocketAddress(QuicIpAddress::Any4(), 5); |
542 QuicConnectionId connection_id = 1; | 541 QuicConnectionId connection_id = 1; |
543 | 542 |
544 EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address)) | 543 EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address)) |
545 .Times(0); | 544 .Times(0); |
546 ProcessPacket(client_address, connection_id, true, | 545 ProcessPacket(client_address, connection_id, true, |
547 static_cast<QuicVersion>(QuicVersionMin() - 1), SerializeCHLO(), | 546 static_cast<QuicVersion>(QuicVersionMin() - 1), SerializeCHLO(), |
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 check.Call(2); | 2043 check.Call(2); |
2045 GetFakeProofSource()->InvokePendingCallback(0); | 2044 GetFakeProofSource()->InvokePendingCallback(0); |
2046 ASSERT_EQ(GetFakeProofSource()->NumPendingCallbacks(), 0); | 2045 ASSERT_EQ(GetFakeProofSource()->NumPendingCallbacks(), 0); |
2047 EXPECT_FALSE(store->HasBufferedPackets(conn_id)); | 2046 EXPECT_FALSE(store->HasBufferedPackets(conn_id)); |
2048 EXPECT_FALSE(time_wait_list_manager_->IsConnectionIdInTimeWait(conn_id)); | 2047 EXPECT_FALSE(time_wait_list_manager_->IsConnectionIdInTimeWait(conn_id)); |
2049 } | 2048 } |
2050 | 2049 |
2051 } // namespace | 2050 } // namespace |
2052 } // namespace test | 2051 } // namespace test |
2053 } // namespace net | 2052 } // namespace net |
OLD | NEW |