Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: net/tools/quic/quic_simple_server_test.cc

Issue 2236973002: Landing Recent QUIC changes until 4AM, Aug 7, 2016 UTC-4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip quic_sequencer_buffer_retire_block_in_time to true Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/quic_simple_server_stream_test.cc ('k') | net/tools/quic/quic_socket_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_simple_server.h" 5 #include "net/tools/quic/quic_simple_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"
11 #include "net/quic/test_tools/quic_test_utils.h" 11 #include "net/quic/test_tools/quic_test_utils.h"
12 #include "net/tools/quic/quic_simple_server_session_helper.h" 12 #include "net/tools/quic/quic_simple_server_session_helper.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 using ::testing::_; 15 using ::testing::_;
16 using net::test::CryptoTestUtils; 16 using net::test::CryptoTestUtils;
17 17
18 namespace net { 18 namespace net {
19 namespace test { 19 namespace test {
20 20
21 // TODO(dmz) Remove "Chrome" part of name once net/tools/quic is deleted. 21 // TODO(dmz) Remove "Chrome" part of name once net/tools/quic is deleted.
22 class QuicChromeServerDispatchPacketTest : public ::testing::Test { 22 class QuicChromeServerDispatchPacketTest : public ::testing::Test {
23 public: 23 public:
24 QuicChromeServerDispatchPacketTest() 24 QuicChromeServerDispatchPacketTest()
25 : crypto_config_("blah", 25 : crypto_config_("blah",
26 QuicRandom::GetInstance(), 26 QuicRandom::GetInstance(),
27 CryptoTestUtils::ProofSourceForTesting()), 27 CryptoTestUtils::ProofSourceForTesting()),
28 version_manager_(QuicSupportedVersions()), 28 version_manager_(AllSupportedVersions()),
29 dispatcher_( 29 dispatcher_(
30 config_, 30 config_,
31 &crypto_config_, 31 &crypto_config_,
32 &version_manager_, 32 &version_manager_,
33 std::unique_ptr<MockQuicConnectionHelper>( 33 std::unique_ptr<MockQuicConnectionHelper>(
34 new net::test::MockQuicConnectionHelper), 34 new net::test::MockQuicConnectionHelper),
35 std::unique_ptr<QuicServerSessionBase::Helper>( 35 std::unique_ptr<QuicServerSessionBase::Helper>(
36 new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())), 36 new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())),
37 std::unique_ptr<MockAlarmFactory>( 37 std::unique_ptr<MockAlarmFactory>(
38 new net::test::MockAlarmFactory)) { 38 new net::test::MockAlarmFactory)) {
(...skipping 25 matching lines...) Expand all
64 QuicReceivedPacket encrypted_valid_packet(QuicUtils::AsChars(valid_packet), 64 QuicReceivedPacket encrypted_valid_packet(QuicUtils::AsChars(valid_packet),
65 arraysize(valid_packet), 65 arraysize(valid_packet),
66 QuicTime::Zero(), false); 66 QuicTime::Zero(), false);
67 67
68 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); 68 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
69 DispatchPacket(encrypted_valid_packet); 69 DispatchPacket(encrypted_valid_packet);
70 } 70 }
71 71
72 } // namespace test 72 } // namespace test
73 } // namespace net 73 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_stream_test.cc ('k') | net/tools/quic/quic_socket_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698