OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test_tools/quic_test_utils.h" | 5 #include "net/quic/test_tools/quic_test_utils.h" |
6 | 6 |
7 #include "base/sha1.h" | 7 #include "base/sha1.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "net/quic/crypto/crypto_framer.h" | 10 #include "net/quic/crypto/crypto_framer.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 } | 222 } |
223 | 223 |
224 namespace { | 224 namespace { |
225 class NiceMockPacketWriterFactory | 225 class NiceMockPacketWriterFactory |
226 : public QuicConnection::PacketWriterFactory { | 226 : public QuicConnection::PacketWriterFactory { |
227 public: | 227 public: |
228 NiceMockPacketWriterFactory() {} | 228 NiceMockPacketWriterFactory() {} |
229 virtual ~NiceMockPacketWriterFactory() {} | 229 virtual ~NiceMockPacketWriterFactory() {} |
230 | 230 |
231 virtual QuicPacketWriter* Create( | 231 virtual QuicPacketWriter* Create( |
232 QuicConnection* /*connection*/) const override { | 232 QuicConnection* /*connection*/) const OVERRIDE { |
233 return new testing::NiceMock<MockPacketWriter>(); | 233 return new testing::NiceMock<MockPacketWriter>(); |
234 } | 234 } |
235 | 235 |
236 private: | 236 private: |
237 DISALLOW_COPY_AND_ASSIGN(NiceMockPacketWriterFactory); | 237 DISALLOW_COPY_AND_ASSIGN(NiceMockPacketWriterFactory); |
238 }; | 238 }; |
239 } // namespace | 239 } // namespace |
240 | 240 |
241 MockConnection::MockConnection(bool is_server) | 241 MockConnection::MockConnection(bool is_server) |
242 : QuicConnection(kTestConnectionId, | 242 : QuicConnection(kTestConnectionId, |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 // different way, so TestWriterFactory::OnPacketSent might never be called. | 666 // different way, so TestWriterFactory::OnPacketSent might never be called. |
667 factory_->current_writer_ = this; | 667 factory_->current_writer_ = this; |
668 return QuicPerConnectionPacketWriter::WritePacket(buffer, | 668 return QuicPerConnectionPacketWriter::WritePacket(buffer, |
669 buf_len, | 669 buf_len, |
670 self_address, | 670 self_address, |
671 peer_address); | 671 peer_address); |
672 } | 672 } |
673 | 673 |
674 } // namespace test | 674 } // namespace test |
675 } // namespace net | 675 } // namespace net |
OLD | NEW |