| Index: net/tools/quic/quic_dispatcher_test.cc
|
| diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc
|
| index a8467befd730fb7b7ca7dc47a3684d0c66c5f262..46ad07e9b266ccbf07b7ddc137e2bae60d5cf7f0 100644
|
| --- a/net/tools/quic/quic_dispatcher_test.cc
|
| +++ b/net/tools/quic/quic_dispatcher_test.cc
|
| @@ -705,7 +705,6 @@ TEST_P(QuicDispatcherStatelessRejectTest, ParameterizedBasicTest) {
|
|
|
| TEST_P(QuicDispatcherStatelessRejectTest, CheapRejects) {
|
| FLAGS_quic_use_cheap_stateless_rejects = true;
|
| - FLAGS_quic_buffer_packet_till_chlo = true;
|
| CreateTimeWaitListManager();
|
|
|
| IPEndPoint client_address(net::test::Loopback4(), 1);
|
| @@ -754,35 +753,8 @@ TEST_P(QuicDispatcherStatelessRejectTest, BufferNonChlo) {
|
| const IPEndPoint client_address(net::test::Loopback4(), 1);
|
| const QuicConnectionId connection_id = 1;
|
|
|
| - if (!GetParam().enable_stateless_rejects_via_flag &&
|
| - !FLAGS_quic_buffer_packet_till_chlo) {
|
| - // If stateless rejects are not being used and early arrived packets are not
|
| - // buffered, then a connection will be created immediately.
|
| - EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address))
|
| - .WillOnce(testing::Return(
|
| - CreateSessionBasedOnTestParams(connection_id, client_address)));
|
| - EXPECT_CALL(*reinterpret_cast<MockQuicConnection*>(session1_->connection()),
|
| - ProcessUdpPacket(_, client_address, _))
|
| - .WillOnce(testing::WithArg<2>(
|
| - Invoke(CreateFunctor(&QuicDispatcherTest::ValidatePacket,
|
| - base::Unretained(this), connection_id))));
|
| - }
|
| - bool first_packet_dropped = GetParam().enable_stateless_rejects_via_flag &&
|
| - !FLAGS_quic_buffer_packet_till_chlo;
|
| - if (first_packet_dropped) {
|
| - // Never do stateless reject while
|
| - // FLAGS_quic_buffer_packet_till_chlo is off.
|
| - EXPECT_QUIC_BUG(
|
| - ProcessPacket(client_address, connection_id, true, false,
|
| - "NOT DATA FOR A CHLO"),
|
| - "Have to drop packet because buffering non-chlo packet is "
|
| - "not supported while trying to do stateless reject. "
|
| - "--gfe2_reloadable_flag_quic_buffer_packet_till_chlo false "
|
| - "--gfe2_reloadable_flag_quic_use_cheap_stateless_rejects true");
|
| - } else {
|
| ProcessPacket(client_address, connection_id, true, false,
|
| "NOT DATA FOR A CHLO");
|
| - }
|
|
|
| // Process the first packet for the connection.
|
| // clang-format off
|
| @@ -796,8 +768,6 @@ TEST_P(QuicDispatcherStatelessRejectTest, BufferNonChlo) {
|
| nullptr);
|
| // clang-format on
|
|
|
| - if (GetParam().enable_stateless_rejects_via_flag ||
|
| - FLAGS_quic_buffer_packet_till_chlo) {
|
| // If stateless rejects are enabled then a connection will be created now
|
| // and the buffered packet will be processed
|
| EXPECT_CALL(*dispatcher_, CreateQuicSession(connection_id, client_address))
|
| @@ -808,8 +778,6 @@ TEST_P(QuicDispatcherStatelessRejectTest, BufferNonChlo) {
|
| .WillOnce(testing::WithArg<2>(
|
| Invoke(CreateFunctor(&QuicDispatcherTest::ValidatePacket,
|
| base::Unretained(this), connection_id))));
|
| - }
|
| - if (!first_packet_dropped) {
|
| // Expect both packets to be passed to ProcessUdpPacket(). And one of them
|
| // is already expected in CreateSessionBasedOnTestParams().
|
| EXPECT_CALL(*reinterpret_cast<MockQuicConnection*>(session1_->connection()),
|
| @@ -818,15 +786,10 @@ TEST_P(QuicDispatcherStatelessRejectTest, BufferNonChlo) {
|
| Invoke(CreateFunctor(&QuicDispatcherTest::ValidatePacket,
|
| base::Unretained(this), connection_id))))
|
| .RetiresOnSaturation();
|
| - } else {
|
| - // Since first packet is dropped, remove it from map to skip
|
| - // ValidatePacket() on it.
|
| - data_connection_map_[connection_id].pop_front();
|
| - }
|
| - ProcessPacket(client_address, connection_id, true, false,
|
| - client_hello.GetSerialized().AsStringPiece().as_string());
|
| - EXPECT_FALSE(
|
| - time_wait_list_manager_->IsConnectionIdInTimeWait(connection_id));
|
| + ProcessPacket(client_address, connection_id, true, false,
|
| + client_hello.GetSerialized().AsStringPiece().as_string());
|
| + EXPECT_FALSE(
|
| + time_wait_list_manager_->IsConnectionIdInTimeWait(connection_id));
|
| }
|
|
|
| // Verify the stopgap test: Packets with truncated connection IDs should be
|
| @@ -1102,7 +1065,6 @@ class BufferedPacketStoreTest
|
| : QuicDispatcherTest(),
|
| client_addr_(Loopback4(), 1234),
|
| proof_(new QuicCryptoProof) {
|
| - FLAGS_quic_buffer_packet_till_chlo = true;
|
| FLAGS_quic_use_cheap_stateless_rejects =
|
| GetParam().support_cheap_stateless_reject;
|
| FLAGS_enable_quic_stateless_reject_support =
|
| @@ -1552,7 +1514,6 @@ class AsyncGetProofTest : public QuicDispatcherTest {
|
| crypto_config_peer_(&crypto_config_),
|
| proof_(new QuicCryptoProof) {
|
| FLAGS_enable_async_get_proof = true;
|
| - FLAGS_quic_buffer_packet_till_chlo = true;
|
| FLAGS_enable_quic_stateless_reject_support = true;
|
| FLAGS_quic_use_cheap_stateless_rejects = true;
|
| FLAGS_quic_create_session_after_insertion = true;
|
|
|