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/tools/quic/test_tools/quic_test_utils.h" | 5 #include "net/tools/quic/test_tools/quic_test_utils.h" |
6 | 6 |
7 #include "net/quic/test_tools/quic_test_utils.h" | 7 #include "net/quic/test_tools/quic_test_utils.h" |
8 #include "net/tools/quic/quic_epoll_connection_helper.h" | 8 #include "net/tools/quic/quic_epoll_connection_helper.h" |
9 | 9 |
10 using net::test::MockHelper; | 10 using net::test::MockHelper; |
(...skipping 23 matching lines...) Expand all Loading... |
34 IPEndPoint address, | 34 IPEndPoint address, |
35 QuicConnectionHelperInterface* helper, | 35 QuicConnectionHelperInterface* helper, |
36 bool is_server) | 36 bool is_server) |
37 : QuicConnection(guid, address, helper, is_server), | 37 : QuicConnection(guid, address, helper, is_server), |
38 has_mock_helper_(false) { | 38 has_mock_helper_(false) { |
39 } | 39 } |
40 | 40 |
41 MockConnection::~MockConnection() { | 41 MockConnection::~MockConnection() { |
42 } | 42 } |
43 | 43 |
| 44 void MockConnection::AdvanceTime(QuicTime::Delta delta) { |
| 45 CHECK(has_mock_helper_) << "Cannot advance time unless a MockClock is being" |
| 46 " used"; |
| 47 static_cast<MockHelper*>(helper())->AdvanceTime(delta); |
| 48 } |
| 49 |
44 } // namespace test | 50 } // namespace test |
45 } // namespace tools | 51 } // namespace tools |
46 } // namespace net | 52 } // namespace net |
OLD | NEW |