QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "net/third_party/quiche/src/quic/tools/quic_simple_crypto_server_stream_helper.h" |
| 6 | |
| 7 | #include "net/third_party/quiche/src/quic/core/quic_utils.h" |
| 8 | #include "net/third_party/quiche/src/quic/platform/api/quic_test.h" |
| 9 | #include "net/third_party/quiche/src/quic/test_tools/mock_random.h" |
| 10 | #include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h" |
| 11 | |
| 12 | namespace quic { |
| 13 | |
| 14 | class QuicSimpleCryptoServerStreamHelperTest : public QuicTest {}; |
| 15 | |
| 16 | TEST_F(QuicSimpleCryptoServerStreamHelperTest, GenerateConnectionIdForReject) { |
| 17 | test::MockRandom random; |
| 18 | QuicSimpleCryptoServerStreamHelper helper(&random); |
| 19 | |
| 20 | EXPECT_EQ(QuicUtils::CreateRandomConnectionId(&random), |
| 21 | helper.GenerateConnectionIdForReject(QUIC_VERSION_99, |
| 22 | test::TestConnectionId())); |
| 23 | } |
| 24 | |
| 25 | } // namespace quic |