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

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

Issue 1397983007: relnote: remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rch_insecure_quic
Patch Set: Compile fix Created 5 years, 2 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
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/crypto/quic_random.h" 7 #include "net/quic/crypto/quic_random.h"
8 #include "net/quic/quic_utils.h" 8 #include "net/quic/quic_utils.h"
9 #include "net/quic/test_tools/crypto_test_utils.h"
9 #include "net/quic/test_tools/mock_quic_dispatcher.h" 10 #include "net/quic/test_tools/mock_quic_dispatcher.h"
10 #include "net/quic/test_tools/quic_test_utils.h" 11 #include "net/quic/test_tools/quic_test_utils.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 using ::testing::_; 14 using ::testing::_;
15 using net::test::CryptoTestUtils;
14 16
15 namespace net { 17 namespace net {
16 namespace tools { 18 namespace tools {
17 namespace test { 19 namespace test {
18 20
19 // 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.
20 class QuicChromeServerDispatchPacketTest : public ::testing::Test { 22 class QuicChromeServerDispatchPacketTest : public ::testing::Test {
21 public: 23 public:
22 QuicChromeServerDispatchPacketTest() 24 QuicChromeServerDispatchPacketTest()
23 : crypto_config_("blah", QuicRandom::GetInstance()), 25 : crypto_config_("blah",
26 QuicRandom::GetInstance(),
27 CryptoTestUtils::ProofSourceForTesting()),
24 dispatcher_(config_, 28 dispatcher_(config_,
25 &crypto_config_, 29 &crypto_config_,
26 new tools::QuicDispatcher::DefaultPacketWriterFactory(), 30 new tools::QuicDispatcher::DefaultPacketWriterFactory(),
27 new net::test::MockHelper) { 31 new net::test::MockHelper) {
28 dispatcher_.InitializeWithWriter(nullptr); 32 dispatcher_.InitializeWithWriter(nullptr);
29 } 33 }
30 34
31 void DispatchPacket(const QuicEncryptedPacket& packet) { 35 void DispatchPacket(const QuicEncryptedPacket& packet) {
32 IPEndPoint client_addr, server_addr; 36 IPEndPoint client_addr, server_addr;
33 dispatcher_.ProcessPacket(server_addr, client_addr, packet); 37 dispatcher_.ProcessPacket(server_addr, client_addr, packet);
(...skipping 20 matching lines...) Expand all
54 QuicEncryptedPacket encrypted_valid_packet(QuicUtils::AsChars(valid_packet), 58 QuicEncryptedPacket encrypted_valid_packet(QuicUtils::AsChars(valid_packet),
55 arraysize(valid_packet), false); 59 arraysize(valid_packet), false);
56 60
57 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); 61 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
58 DispatchPacket(encrypted_valid_packet); 62 DispatchPacket(encrypted_valid_packet);
59 } 63 }
60 64
61 } // namespace tools 65 } // namespace tools
62 } // namespace test 66 } // namespace test
63 } // namespace net 67 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_bin.cc ('k') | net/tools/quic/quic_spdy_client_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698