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

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

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 years, 7 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/core/crypto/quic_random.h" 7 #include "net/quic/core/crypto/quic_random.h"
8 #include "net/quic/core/quic_crypto_stream.h" 8 #include "net/quic/core/quic_crypto_stream.h"
9 #include "net/quic/core/quic_utils.h" 9 #include "net/quic/core/quic_utils.h"
10 #include "net/quic/platform/api/quic_test.h"
10 #include "net/quic/test_tools/crypto_test_utils.h" 11 #include "net/quic/test_tools/crypto_test_utils.h"
11 #include "net/quic/test_tools/mock_quic_dispatcher.h" 12 #include "net/quic/test_tools/mock_quic_dispatcher.h"
12 #include "net/quic/test_tools/quic_test_utils.h" 13 #include "net/quic/test_tools/quic_test_utils.h"
13 #include "net/tools/quic/quic_simple_server_session_helper.h" 14 #include "net/tools/quic/quic_simple_server_session_helper.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 16
16 using ::testing::_; 17 using ::testing::_;
17 18
18 namespace net { 19 namespace net {
19 namespace test { 20 namespace test {
20 21
21 // TODO(dmz) Remove "Chrome" part of name once net/tools/quic is deleted. 22 // TODO(dmz) Remove "Chrome" part of name once net/tools/quic is deleted.
22 class QuicChromeServerDispatchPacketTest : public ::testing::Test { 23 class QuicChromeServerDispatchPacketTest : public QuicTest {
23 public: 24 public:
24 QuicChromeServerDispatchPacketTest() 25 QuicChromeServerDispatchPacketTest()
25 : crypto_config_("blah", 26 : crypto_config_("blah",
26 QuicRandom::GetInstance(), 27 QuicRandom::GetInstance(),
27 crypto_test_utils::ProofSourceForTesting()), 28 crypto_test_utils::ProofSourceForTesting()),
28 version_manager_(AllSupportedVersions()), 29 version_manager_(AllSupportedVersions()),
29 dispatcher_( 30 dispatcher_(
30 config_, 31 config_,
31 &crypto_config_, 32 &crypto_config_,
32 &version_manager_, 33 &version_manager_,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 QuicReceivedPacket encrypted_valid_packet( 68 QuicReceivedPacket encrypted_valid_packet(
68 reinterpret_cast<char*>(valid_packet), arraysize(valid_packet), 69 reinterpret_cast<char*>(valid_packet), arraysize(valid_packet),
69 QuicTime::Zero(), false); 70 QuicTime::Zero(), false);
70 71
71 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); 72 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
72 DispatchPacket(encrypted_valid_packet); 73 DispatchPacket(encrypted_valid_packet);
73 } 74 }
74 75
75 } // namespace test 76 } // namespace test
76 } // namespace net 77 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_server_stream_test.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