| 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/mock_quic_time_wait_list_manager.h" | 5 #include "net/tools/quic/test_tools/mock_quic_time_wait_list_manager.h" |
| 6 | 6 |
| 7 using testing::_; | 7 using testing::_; |
| 8 using testing::AnyNumber; | 8 using testing::AnyNumber; |
| 9 using testing::Invoke; | 9 using testing::Invoke; |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 namespace test { | 12 namespace test { |
| 13 | 13 |
| 14 MockTimeWaitListManager::MockTimeWaitListManager( | 14 MockTimeWaitListManager::MockTimeWaitListManager( |
| 15 QuicPacketWriter* writer, | 15 QuicPacketWriter* writer, |
| 16 QuicServerSessionVisitor* visitor, | 16 QuicServerSessionVisitor* visitor, |
| 17 QuicConnectionHelperInterface* helper) | 17 QuicConnectionHelperInterface* helper, |
| 18 : QuicTimeWaitListManager(writer, visitor, helper) { | 18 QuicAlarmFactory* alarm_factory) |
| 19 : QuicTimeWaitListManager(writer, visitor, helper, alarm_factory) { |
| 19 // Though AddConnectionIdToTimeWait is mocked, we want to retain its | 20 // Though AddConnectionIdToTimeWait is mocked, we want to retain its |
| 20 // functionality. | 21 // functionality. |
| 21 EXPECT_CALL(*this, AddConnectionIdToTimeWait(_, _, _, _)) | 22 EXPECT_CALL(*this, AddConnectionIdToTimeWait(_, _, _, _)) |
| 22 .Times(testing::AnyNumber()); | 23 .Times(testing::AnyNumber()); |
| 23 ON_CALL(*this, AddConnectionIdToTimeWait(_, _, _, _)) | 24 ON_CALL(*this, AddConnectionIdToTimeWait(_, _, _, _)) |
| 24 .WillByDefault( | 25 .WillByDefault( |
| 25 Invoke(this, &MockTimeWaitListManager:: | 26 Invoke(this, &MockTimeWaitListManager:: |
| 26 QuicTimeWaitListManager_AddConnectionIdToTimeWait)); | 27 QuicTimeWaitListManager_AddConnectionIdToTimeWait)); |
| 27 } | 28 } |
| 28 | 29 |
| 29 MockTimeWaitListManager::~MockTimeWaitListManager() {} | 30 MockTimeWaitListManager::~MockTimeWaitListManager() {} |
| 30 | 31 |
| 31 } // namespace test | 32 } // namespace test |
| 32 } // namespace net | 33 } // namespace net |
| OLD | NEW |