| Index: net/quic/test_tools/quic_test_utils.cc
|
| diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
|
| index a1c11791530101f0e5256e1fb9b10b10102cbac5..3e3171f6839d323cef2f97890da7589fec9f30d2 100644
|
| --- a/net/quic/test_tools/quic_test_utils.cc
|
| +++ b/net/quic/test_tools/quic_test_utils.cc
|
| @@ -3,6 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| #include "net/quic/test_tools/quic_test_utils.h"
|
| +
|
| #include "net/quic/crypto/crypto_framer.h"
|
|
|
| using std::max;
|
| @@ -34,6 +35,16 @@ void FramerVisitorCapturingAcks::OnAckFrame(const QuicAckFrame& frame) {
|
| frame_ = frame;
|
| }
|
|
|
| +MockHelper::MockHelper() {
|
| +}
|
| +
|
| +MockHelper::~MockHelper() {
|
| +}
|
| +
|
| +QuicClock* MockHelper::GetClock() {
|
| + return &clock_;
|
| +}
|
| +
|
| MockConnectionVisitor::MockConnectionVisitor() {
|
| }
|
|
|
| @@ -156,6 +167,36 @@ QuicPacket* ConstructHandshakePacket(QuicGuid guid, CryptoTag tag) {
|
| return packet;
|
| }
|
|
|
| +MockConnection::MockConnection(QuicGuid guid, IPEndPoint address)
|
| + : QuicConnection(guid, address, new MockHelper()) {
|
| +}
|
| +
|
| +MockConnection::~MockConnection() {
|
| +}
|
| +
|
| +PacketSavingConnection::PacketSavingConnection(QuicGuid guid,
|
| + IPEndPoint address)
|
| + : MockConnection(guid, address) {
|
| +}
|
| +
|
| +PacketSavingConnection::~PacketSavingConnection() {
|
| +}
|
| +
|
| +bool PacketSavingConnection::SendPacket(QuicPacketSequenceNumber number,
|
| + QuicPacket* packet,
|
| + bool resend,
|
| + bool force) {
|
| + packets_.push_back(packet);
|
| + return true;
|
| +}
|
| +
|
| +MockSession::MockSession(QuicConnection* connection, bool is_server)
|
| + : QuicSession(connection, is_server) {
|
| +}
|
| +
|
| +MockSession::~MockSession() {
|
| +}
|
| +
|
| } // namespace test
|
|
|
| } // namespace net
|
|
|