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

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

Issue 1411063004: Remove insecure QUIC support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enough! Created 5 years, 1 month 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_server_session_test.cc ('k') | net/tools/quic/quic_simple_client.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 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/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/tools/quic/quic_epoll_connection_helper.h" 11 #include "net/tools/quic/quic_epoll_connection_helper.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 using net::test::MockQuicDispatcher; 16 using net::test::MockQuicDispatcher;
15 17
16 namespace net { 18 namespace net {
17 namespace tools { 19 namespace tools {
18 namespace test { 20 namespace test {
19 21
20 namespace { 22 namespace {
21 23
22 class QuicServerDispatchPacketTest : public ::testing::Test { 24 class QuicServerDispatchPacketTest : public ::testing::Test {
23 public: 25 public:
24 QuicServerDispatchPacketTest() 26 QuicServerDispatchPacketTest()
25 : crypto_config_("blah", QuicRandom::GetInstance()), 27 : crypto_config_("blah",
28 QuicRandom::GetInstance(),
29 CryptoTestUtils::ProofSourceForTesting()),
26 dispatcher_(config_, 30 dispatcher_(config_,
27 &crypto_config_, 31 &crypto_config_,
28 new QuicDispatcher::DefaultPacketWriterFactory(), 32 new QuicDispatcher::DefaultPacketWriterFactory(),
29 new QuicEpollConnectionHelper(&eps_)) { 33 new QuicEpollConnectionHelper(&eps_)) {
30 dispatcher_.InitializeWithWriter(new QuicDefaultPacketWriter(1234)); 34 dispatcher_.InitializeWithWriter(new QuicDefaultPacketWriter(1234));
31 } 35 }
32 36
33 void DispatchPacket(const QuicEncryptedPacket& packet) { 37 void DispatchPacket(const QuicEncryptedPacket& packet) {
34 IPEndPoint client_addr, server_addr; 38 IPEndPoint client_addr, server_addr;
35 dispatcher_.ProcessPacket(server_addr, client_addr, packet); 39 dispatcher_.ProcessPacket(server_addr, client_addr, packet);
(...skipping 25 matching lines...) Expand all
61 arraysize(valid_packet), false); 65 arraysize(valid_packet), false);
62 66
63 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); 67 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
64 DispatchPacket(encrypted_valid_packet); 68 DispatchPacket(encrypted_valid_packet);
65 } 69 }
66 70
67 } // namespace 71 } // namespace
68 } // namespace test 72 } // namespace test
69 } // namespace tools 73 } // namespace tools
70 } // namespace net 74 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server_session_test.cc ('k') | net/tools/quic/quic_simple_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698