| 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 base::StringPiece; |
| 10 using net::test::MockHelper; | 11 using net::test::MockHelper; |
| 11 | 12 |
| 12 namespace net { | 13 namespace net { |
| 13 namespace tools { | 14 namespace tools { |
| 14 namespace test { | 15 namespace test { |
| 15 | 16 |
| 16 MockConnection::MockConnection(QuicGuid guid, | 17 MockConnection::MockConnection(QuicGuid guid, |
| 17 IPEndPoint address, | 18 IPEndPoint address, |
| 18 int fd, | 19 int fd, |
| 19 EpollServer* eps, | 20 EpollServer* eps, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 40 | 41 |
| 41 MockConnection::~MockConnection() { | 42 MockConnection::~MockConnection() { |
| 42 } | 43 } |
| 43 | 44 |
| 44 void MockConnection::AdvanceTime(QuicTime::Delta delta) { | 45 void MockConnection::AdvanceTime(QuicTime::Delta delta) { |
| 45 CHECK(has_mock_helper_) << "Cannot advance time unless a MockClock is being" | 46 CHECK(has_mock_helper_) << "Cannot advance time unless a MockClock is being" |
| 46 " used"; | 47 " used"; |
| 47 static_cast<MockHelper*>(helper())->AdvanceTime(delta); | 48 static_cast<MockHelper*>(helper())->AdvanceTime(delta); |
| 48 } | 49 } |
| 49 | 50 |
| 51 bool TestDecompressorVisitor::OnDecompressedData(StringPiece data) { |
| 52 data.AppendToString(&data_); |
| 53 return true; |
| 54 } |
| 55 |
| 50 } // namespace test | 56 } // namespace test |
| 51 } // namespace tools | 57 } // namespace tools |
| 52 } // namespace net | 58 } // namespace net |
| OLD | NEW |