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/tools/quic/quic_server.h" | 5 #include "net/tools/quic/quic_server.h" |
6 | 6 |
7 #include "net/quic/core/crypto/quic_random.h" | 7 #include "net/quic/core/crypto/quic_random.h" |
8 #include "net/quic/core/quic_utils.h" | 8 #include "net/quic/core/quic_utils.h" |
9 #include "net/quic/test_tools/crypto_test_utils.h" | 9 #include "net/quic/test_tools/crypto_test_utils.h" |
10 #include "net/quic/test_tools/mock_quic_dispatcher.h" | 10 #include "net/quic/test_tools/mock_quic_dispatcher.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace test { | 21 namespace test { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 class QuicServerDispatchPacketTest : public ::testing::Test { | 25 class QuicServerDispatchPacketTest : public ::testing::Test { |
26 public: | 26 public: |
27 QuicServerDispatchPacketTest() | 27 QuicServerDispatchPacketTest() |
28 : crypto_config_("blah", | 28 : crypto_config_("blah", |
29 QuicRandom::GetInstance(), | 29 QuicRandom::GetInstance(), |
30 CryptoTestUtils::ProofSourceForTesting()), | 30 CryptoTestUtils::ProofSourceForTesting()), |
31 version_manager_(QuicSupportedVersions()), | 31 version_manager_(AllSupportedVersions()), |
32 dispatcher_( | 32 dispatcher_( |
33 config_, | 33 config_, |
34 &crypto_config_, | 34 &crypto_config_, |
35 &version_manager_, | 35 &version_manager_, |
36 std::unique_ptr<QuicEpollConnectionHelper>( | 36 std::unique_ptr<QuicEpollConnectionHelper>( |
37 new QuicEpollConnectionHelper(&eps_, | 37 new QuicEpollConnectionHelper(&eps_, |
38 QuicAllocator::BUFFER_POOL)), | 38 QuicAllocator::BUFFER_POOL)), |
39 std::unique_ptr<QuicServerSessionBase::Helper>( | 39 std::unique_ptr<QuicServerSessionBase::Helper>( |
40 new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())), | 40 new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())), |
41 std::unique_ptr<QuicEpollAlarmFactory>( | 41 std::unique_ptr<QuicEpollAlarmFactory>( |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 arraysize(valid_packet), | 75 arraysize(valid_packet), |
76 QuicTime::Zero(), false); | 76 QuicTime::Zero(), false); |
77 | 77 |
78 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); | 78 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); |
79 DispatchPacket(encrypted_valid_packet); | 79 DispatchPacket(encrypted_valid_packet); |
80 } | 80 } |
81 | 81 |
82 } // namespace | 82 } // namespace |
83 } // namespace test | 83 } // namespace test |
84 } // namespace net | 84 } // namespace net |
OLD | NEW |