OLD | NEW |
---|---|
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/quic/quic_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/mock_quic_dispatcher.h" | 9 #include "net/quic/test_tools/mock_quic_dispatcher.h" |
10 #include "net/quic/test_tools/quic_test_utils.h" | 10 #include "net/quic/test_tools/quic_test_utils.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 using ::testing::_; | 13 using ::testing::_; |
14 | 14 |
15 namespace net { | 15 namespace net { |
ramant (doing other things)
2015/03/26 18:09:24
nit: should we add "namespace tools {"?
Ryan Hamilton
2015/03/26 18:59:49
Done.
| |
16 namespace test { | 16 namespace test { |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 // TODO(dmz) Remove "Chrome" part of name once net/tools/quic is deleted. | 20 // TODO(dmz) Remove "Chrome" part of name once net/tools/quic is deleted. |
21 class QuicChromeServerDispatchPacketTest : public ::testing::Test { | 21 class QuicChromeServerDispatchPacketTest : public ::testing::Test { |
22 public: | 22 public: |
23 QuicChromeServerDispatchPacketTest() | 23 QuicChromeServerDispatchPacketTest() |
24 : crypto_config_("blah", QuicRandom::GetInstance()), | 24 : crypto_config_("blah", QuicRandom::GetInstance()), |
25 dispatcher_(config_, | 25 dispatcher_(config_, |
(...skipping 29 matching lines...) Expand all Loading... | |
55 QuicEncryptedPacket encrypted_valid_packet(QuicUtils::AsChars(valid_packet), | 55 QuicEncryptedPacket encrypted_valid_packet(QuicUtils::AsChars(valid_packet), |
56 arraysize(valid_packet), false); | 56 arraysize(valid_packet), false); |
57 | 57 |
58 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); | 58 EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1); |
59 DispatchPacket(encrypted_valid_packet); | 59 DispatchPacket(encrypted_valid_packet); |
60 } | 60 } |
61 | 61 |
62 } // namespace | 62 } // namespace |
63 } // namespace test | 63 } // namespace test |
64 } // namespace net | 64 } // namespace net |
OLD | NEW |