OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/core/quic_server_session_base.h" | 5 #include "net/quic/core/quic_server_session_base.h" |
6 | 6 |
7 #include <cstdint> | 7 #include <cstdint> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 }; | 595 }; |
596 | 596 |
597 INSTANTIATE_TEST_CASE_P(StreamMemberLifetimeTests, | 597 INSTANTIATE_TEST_CASE_P(StreamMemberLifetimeTests, |
598 StreamMemberLifetimeTest, | 598 StreamMemberLifetimeTest, |
599 ::testing::ValuesIn(AllSupportedVersions())); | 599 ::testing::ValuesIn(AllSupportedVersions())); |
600 | 600 |
601 // Trigger an operation which causes an async invocation of | 601 // Trigger an operation which causes an async invocation of |
602 // ProofSource::GetProof. Delay the completion of the operation until after the | 602 // ProofSource::GetProof. Delay the completion of the operation until after the |
603 // stream has been destroyed, and verify that there are no memory bugs. | 603 // stream has been destroyed, and verify that there are no memory bugs. |
604 TEST_P(StreamMemberLifetimeTest, Basic) { | 604 TEST_P(StreamMemberLifetimeTest, Basic) { |
605 FLAGS_quic_reloadable_flag_enable_async_get_proof = true; | |
606 FLAGS_quic_reloadable_flag_enable_quic_stateless_reject_support = true; | 605 FLAGS_quic_reloadable_flag_enable_quic_stateless_reject_support = true; |
607 FLAGS_quic_reloadable_flag_quic_use_cheap_stateless_rejects = true; | 606 FLAGS_quic_reloadable_flag_quic_use_cheap_stateless_rejects = true; |
608 FLAGS_quic_reloadable_flag_quic_create_session_after_insertion = true; | 607 FLAGS_quic_reloadable_flag_quic_create_session_after_insertion = true; |
609 | 608 |
610 const QuicClock* clock = helper_.GetClock(); | 609 const QuicClock* clock = helper_.GetClock(); |
611 QuicVersion version = AllSupportedVersions().front(); | 610 QuicVersion version = AllSupportedVersions().front(); |
612 CryptoHandshakeMessage chlo = crypto_test_utils::GenerateDefaultInchoateCHLO( | 611 CryptoHandshakeMessage chlo = crypto_test_utils::GenerateDefaultInchoateCHLO( |
613 clock, version, &crypto_config_); | 612 clock, version, &crypto_config_); |
614 chlo.SetVector(kCOPT, QuicTagVector{kSREJ}); | 613 chlo.SetVector(kCOPT, QuicTagVector{kSREJ}); |
615 std::vector<QuicVersion> packet_version_list = {version}; | 614 std::vector<QuicVersion> packet_version_list = {version}; |
(...skipping 27 matching lines...) Expand all Loading... |
643 | 642 |
644 // Allow the async ProofSource::GetProof call to complete. Verify (under | 643 // Allow the async ProofSource::GetProof call to complete. Verify (under |
645 // asan) that this does not result in accesses to any freed memory from the | 644 // asan) that this does not result in accesses to any freed memory from the |
646 // session or its subobjects. | 645 // session or its subobjects. |
647 GetFakeProofSource()->InvokePendingCallback(0); | 646 GetFakeProofSource()->InvokePendingCallback(0); |
648 } | 647 } |
649 | 648 |
650 } // namespace | 649 } // namespace |
651 } // namespace test | 650 } // namespace test |
652 } // namespace net | 651 } // namespace net |
OLD | NEW |