| 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 // Common utilities for Quic tests | 5 // Common utilities for Quic tests |
| 6 | 6 |
| 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 ~MockPacketWriter() override; | 512 ~MockPacketWriter() override; |
| 513 | 513 |
| 514 MOCK_METHOD4(WritePacket, | 514 MOCK_METHOD4(WritePacket, |
| 515 WriteResult(const char* buffer, | 515 WriteResult(const char* buffer, |
| 516 size_t buf_len, | 516 size_t buf_len, |
| 517 const IPAddressNumber& self_address, | 517 const IPAddressNumber& self_address, |
| 518 const IPEndPoint& peer_address)); | 518 const IPEndPoint& peer_address)); |
| 519 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); | 519 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); |
| 520 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); | 520 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); |
| 521 MOCK_METHOD0(SetWritable, void()); | 521 MOCK_METHOD0(SetWritable, void()); |
| 522 MOCK_CONST_METHOD1(GetMaxPacketSize, |
| 523 QuicByteCount(const IPEndPoint& peer_address)); |
| 522 | 524 |
| 523 private: | 525 private: |
| 524 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); | 526 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); |
| 525 }; | 527 }; |
| 526 | 528 |
| 527 class MockSendAlgorithm : public SendAlgorithmInterface { | 529 class MockSendAlgorithm : public SendAlgorithmInterface { |
| 528 public: | 530 public: |
| 529 MockSendAlgorithm(); | 531 MockSendAlgorithm(); |
| 530 ~MockSendAlgorithm() override; | 532 ~MockSendAlgorithm() override; |
| 531 | 533 |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 void CreateServerSessionForTest(QuicServerId server_id, | 764 void CreateServerSessionForTest(QuicServerId server_id, |
| 763 QuicTime::Delta connection_start_time, | 765 QuicTime::Delta connection_start_time, |
| 764 QuicCryptoServerConfig* crypto_server_config, | 766 QuicCryptoServerConfig* crypto_server_config, |
| 765 PacketSavingConnection** server_connection, | 767 PacketSavingConnection** server_connection, |
| 766 TestQuicSpdyServerSession** server_session); | 768 TestQuicSpdyServerSession** server_session); |
| 767 | 769 |
| 768 } // namespace test | 770 } // namespace test |
| 769 } // namespace net | 771 } // namespace net |
| 770 | 772 |
| 771 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 773 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |