| 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 819637377076573f2c07ac54e888b8368289da34..aa8eb3748500db11bbafd6e7c815bc9d954f80fe 100644
|
| --- a/net/quic/test_tools/quic_test_utils.cc
|
| +++ b/net/quic/test_tools/quic_test_utils.cc
|
| @@ -127,22 +127,34 @@ QuicRandom* MockHelper::GetRandomGenerator() {
|
| return &random_generator_;
|
| }
|
|
|
| +void MockHelper::AdvanceTime(QuicTime::Delta delta) {
|
| + clock_.AdvanceTime(delta);
|
| +}
|
| +
|
| MockConnection::MockConnection(QuicGuid guid,
|
| IPEndPoint address,
|
| bool is_server)
|
| - : QuicConnection(guid, address, new MockHelper(), is_server) {
|
| + : QuicConnection(guid, address, new MockHelper(), is_server),
|
| + has_mock_helper_(true) {
|
| }
|
|
|
| MockConnection::MockConnection(QuicGuid guid,
|
| IPEndPoint address,
|
| QuicConnectionHelperInterface* helper,
|
| bool is_server)
|
| - : QuicConnection(guid, address, helper, is_server) {
|
| + : QuicConnection(guid, address, helper, is_server),
|
| + has_mock_helper_(false) {
|
| }
|
|
|
| MockConnection::~MockConnection() {
|
| }
|
|
|
| +void MockConnection::AdvanceTime(QuicTime::Delta delta) {
|
| + CHECK(has_mock_helper_) << "Cannot advance time unless a MockClock is being"
|
| + " used";
|
| + static_cast<MockHelper*>(helper())->AdvanceTime(delta);
|
| +}
|
| +
|
| PacketSavingConnection::PacketSavingConnection(QuicGuid guid,
|
| IPEndPoint address,
|
| bool is_server)
|
|
|