| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER, | 525 PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER, |
| 526 QuicDispatcher::kMaxReasonableInitialPacketNumber + 1); | 526 QuicDispatcher::kMaxReasonableInitialPacketNumber + 1); |
| 527 } | 527 } |
| 528 | 528 |
| 529 TEST_F(QuicDispatcherTest, SupportedVersionsChangeInFlight) { | 529 TEST_F(QuicDispatcherTest, SupportedVersionsChangeInFlight) { |
| 530 static_assert(arraysize(kSupportedQuicVersions) == 5u, | 530 static_assert(arraysize(kSupportedQuicVersions) == 5u, |
| 531 "Supported versions out of sync"); | 531 "Supported versions out of sync"); |
| 532 FLAGS_quic_reloadable_flag_quic_disable_version_34 = false; | 532 FLAGS_quic_reloadable_flag_quic_disable_version_34 = false; |
| 533 FLAGS_quic_reloadable_flag_quic_enable_version_36_v3 = true; | 533 FLAGS_quic_reloadable_flag_quic_enable_version_36_v3 = true; |
| 534 FLAGS_quic_reloadable_flag_quic_enable_version_37 = true; | 534 FLAGS_quic_reloadable_flag_quic_enable_version_37 = true; |
| 535 FLAGS_quic_enable_version_38 = true; | 535 FLAGS_quic_reloadable_flag_quic_enable_version_38 = true; |
| 536 QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1); | 536 QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1); |
| 537 server_address_ = QuicSocketAddress(QuicIpAddress::Any4(), 5); | 537 server_address_ = QuicSocketAddress(QuicIpAddress::Any4(), 5); |
| 538 QuicConnectionId connection_id = 1; | 538 QuicConnectionId connection_id = 1; |
| 539 | 539 |
| 540 EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address)) | 540 EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address)) |
| 541 .Times(0); | 541 .Times(0); |
| 542 ProcessPacket(client_address, connection_id, true, | 542 ProcessPacket(client_address, connection_id, true, |
| 543 static_cast<QuicVersion>(QuicVersionMin() - 1), SerializeCHLO(), | 543 static_cast<QuicVersion>(QuicVersionMin() - 1), SerializeCHLO(), |
| 544 PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER, 1); | 544 PACKET_8BYTE_CONNECTION_ID, PACKET_6BYTE_PACKET_NUMBER, 1); |
| 545 ++connection_id; | 545 ++connection_id; |
| (...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 check.Call(2); | 2065 check.Call(2); |
| 2066 GetFakeProofSource()->InvokePendingCallback(0); | 2066 GetFakeProofSource()->InvokePendingCallback(0); |
| 2067 ASSERT_EQ(GetFakeProofSource()->NumPendingCallbacks(), 0); | 2067 ASSERT_EQ(GetFakeProofSource()->NumPendingCallbacks(), 0); |
| 2068 EXPECT_FALSE(store->HasBufferedPackets(conn_id)); | 2068 EXPECT_FALSE(store->HasBufferedPackets(conn_id)); |
| 2069 EXPECT_FALSE(time_wait_list_manager_->IsConnectionIdInTimeWait(conn_id)); | 2069 EXPECT_FALSE(time_wait_list_manager_->IsConnectionIdInTimeWait(conn_id)); |
| 2070 } | 2070 } |
| 2071 | 2071 |
| 2072 } // namespace | 2072 } // namespace |
| 2073 } // namespace test | 2073 } // namespace test |
| 2074 } // namespace net | 2074 } // namespace net |
| OLD | NEW |