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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 IPEndPoint(TestPeerIPAddress(), kTestPort), | 276 IPEndPoint(TestPeerIPAddress(), kTestPort), |
277 new testing::NiceMock<MockHelper>(), | 277 new testing::NiceMock<MockHelper>(), |
278 NiceMockPacketWriterFactory(), | 278 NiceMockPacketWriterFactory(), |
279 /* owns_writer= */ true, | 279 /* owns_writer= */ true, |
280 perspective, | 280 perspective, |
281 /* is_secure= */ false, | 281 /* is_secure= */ false, |
282 QuicSupportedVersions()), | 282 QuicSupportedVersions()), |
283 helper_(helper()) { | 283 helper_(helper()) { |
284 } | 284 } |
285 | 285 |
| 286 MockConnection::MockConnection(QuicConnectionId connection_id, |
| 287 Perspective perspective, |
| 288 bool is_secure) |
| 289 : QuicConnection(connection_id, |
| 290 IPEndPoint(TestPeerIPAddress(), kTestPort), |
| 291 new testing::NiceMock<MockHelper>(), |
| 292 NiceMockPacketWriterFactory(), |
| 293 /* owns_writer= */ true, |
| 294 perspective, |
| 295 is_secure, |
| 296 QuicSupportedVersions()), |
| 297 helper_(helper()) { |
| 298 } |
| 299 |
286 MockConnection::MockConnection(Perspective perspective, | 300 MockConnection::MockConnection(Perspective perspective, |
287 const QuicVersionVector& supported_versions) | 301 const QuicVersionVector& supported_versions) |
288 : QuicConnection(kTestConnectionId, | 302 : QuicConnection(kTestConnectionId, |
289 IPEndPoint(TestPeerIPAddress(), kTestPort), | 303 IPEndPoint(TestPeerIPAddress(), kTestPort), |
290 new testing::NiceMock<MockHelper>(), | 304 new testing::NiceMock<MockHelper>(), |
291 NiceMockPacketWriterFactory(), | 305 NiceMockPacketWriterFactory(), |
292 /* owns_writer= */ true, | 306 /* owns_writer= */ true, |
293 perspective, | 307 perspective, |
294 /* is_secure= */ false, | 308 /* is_secure= */ false, |
295 supported_versions), | 309 supported_versions), |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 // called. | 708 // called. |
695 factory_->current_writer_ = this; | 709 factory_->current_writer_ = this; |
696 return QuicPerConnectionPacketWriter::WritePacket(buffer, | 710 return QuicPerConnectionPacketWriter::WritePacket(buffer, |
697 buf_len, | 711 buf_len, |
698 self_address, | 712 self_address, |
699 peer_address); | 713 peer_address); |
700 } | 714 } |
701 | 715 |
702 } // namespace test | 716 } // namespace test |
703 } // namespace net | 717 } // namespace net |
OLD | NEW |