| Index: net/quic/test_tools/quic_test_utils.h
|
| diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
|
| index 3bec87c01cd41b3fed43940f2028bc75fbfdd7e1..7fe3023ddbfab78f3adb322f27b47f15bd1a92af 100644
|
| --- a/net/quic/test_tools/quic_test_utils.h
|
| +++ b/net/quic/test_tools/quic_test_utils.h
|
| @@ -26,12 +26,18 @@ namespace net {
|
|
|
| namespace test {
|
|
|
| +static const QuicGuid kTestGuid = 42;
|
| +static const int kTestPort = 123;
|
| +
|
| // Upper limit on versions we support.
|
| QuicVersion QuicVersionMax();
|
|
|
| // Lower limit on versions we support.
|
| QuicVersion QuicVersionMin();
|
|
|
| +// Returns an address for 127.0.0.1.
|
| +IPAddressNumber Loopback4();
|
| +
|
| void CompareCharArraysWithHexError(const std::string& description,
|
| const char* actual,
|
| const int actual_len,
|
| @@ -244,13 +250,17 @@ class MockHelper : public QuicConnectionHelperInterface {
|
|
|
| class MockConnection : public QuicConnection {
|
| public:
|
| - // Uses a MockHelper.
|
| - MockConnection(QuicGuid guid, IPEndPoint address, bool is_server);
|
| + // Uses a MockHelper, GUID of 42, and 127.0.0.1:123.
|
| + explicit MockConnection(bool is_server);
|
| +
|
| + // Uses a MockHelper, GUID of 42.
|
| + MockConnection(IPEndPoint address,
|
| + bool is_server);
|
| +
|
| + // Uses a MockHelper, and 127.0.0.1:123
|
| MockConnection(QuicGuid guid,
|
| - IPEndPoint address,
|
| - QuicConnectionHelperInterface* helper,
|
| - QuicPacketWriter* writer,
|
| bool is_server);
|
| +
|
| virtual ~MockConnection();
|
|
|
| // If the constructor that uses a MockHelper has been used then this method
|
| @@ -282,7 +292,6 @@ class MockConnection : public QuicConnection {
|
| }
|
|
|
| private:
|
| - const bool has_mock_helper_;
|
| scoped_ptr<QuicPacketWriter> writer_;
|
| scoped_ptr<QuicConnectionHelperInterface> helper_;
|
|
|
| @@ -291,7 +300,7 @@ class MockConnection : public QuicConnection {
|
|
|
| class PacketSavingConnection : public MockConnection {
|
| public:
|
| - PacketSavingConnection(QuicGuid guid, IPEndPoint address, bool is_server);
|
| + explicit PacketSavingConnection(bool is_server);
|
| virtual ~PacketSavingConnection();
|
|
|
| virtual bool SendOrQueuePacket(EncryptionLevel level,
|
|
|