| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 QuicAckNotifier::DelegateInterface*)); | 336 QuicAckNotifier::DelegateInterface*)); |
| 337 MOCK_METHOD0(IsHandshakeComplete, bool()); | 337 MOCK_METHOD0(IsHandshakeComplete, bool()); |
| 338 MOCK_METHOD0(IsCryptoHandshakeConfirmed, bool()); | 338 MOCK_METHOD0(IsCryptoHandshakeConfirmed, bool()); |
| 339 | 339 |
| 340 private: | 340 private: |
| 341 DISALLOW_COPY_AND_ASSIGN(MockSession); | 341 DISALLOW_COPY_AND_ASSIGN(MockSession); |
| 342 }; | 342 }; |
| 343 | 343 |
| 344 class TestSession : public QuicSession { | 344 class TestSession : public QuicSession { |
| 345 public: | 345 public: |
| 346 TestSession(QuicConnection* connection, | 346 TestSession(QuicConnection* connection, const QuicConfig& config); |
| 347 const QuicConfig& config, | |
| 348 bool is_server); | |
| 349 virtual ~TestSession(); | 347 virtual ~TestSession(); |
| 350 | 348 |
| 351 MOCK_METHOD1(CreateIncomingDataStream, QuicDataStream*(QuicStreamId id)); | 349 MOCK_METHOD1(CreateIncomingDataStream, QuicDataStream*(QuicStreamId id)); |
| 352 MOCK_METHOD0(CreateOutgoingDataStream, QuicDataStream*()); | 350 MOCK_METHOD0(CreateOutgoingDataStream, QuicDataStream*()); |
| 353 | 351 |
| 354 void SetCryptoStream(QuicCryptoStream* stream); | 352 void SetCryptoStream(QuicCryptoStream* stream); |
| 355 | 353 |
| 356 virtual QuicCryptoStream* GetCryptoStream(); | 354 virtual QuicCryptoStream* GetCryptoStream(); |
| 357 | 355 |
| 358 private: | 356 private: |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 MockAckNotifierDelegate(); | 443 MockAckNotifierDelegate(); |
| 446 virtual ~MockAckNotifierDelegate(); | 444 virtual ~MockAckNotifierDelegate(); |
| 447 | 445 |
| 448 MOCK_METHOD0(OnAckNotification, void()); | 446 MOCK_METHOD0(OnAckNotification, void()); |
| 449 }; | 447 }; |
| 450 | 448 |
| 451 } // namespace test | 449 } // namespace test |
| 452 } // namespace net | 450 } // namespace net |
| 453 | 451 |
| 454 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 452 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
| OLD | NEW |