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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 MOCK_METHOD2(OnStreamHeaders, void(QuicStreamId stream_id, | 346 MOCK_METHOD2(OnStreamHeaders, void(QuicStreamId stream_id, |
347 base::StringPiece headers_data)); | 347 base::StringPiece headers_data)); |
348 MOCK_METHOD2(OnStreamHeadersPriority, void(QuicStreamId stream_id, | 348 MOCK_METHOD2(OnStreamHeadersPriority, void(QuicStreamId stream_id, |
349 QuicPriority priority)); | 349 QuicPriority priority)); |
350 MOCK_METHOD3(OnStreamHeadersComplete, void(QuicStreamId stream_id, | 350 MOCK_METHOD3(OnStreamHeadersComplete, void(QuicStreamId stream_id, |
351 bool fin, | 351 bool fin, |
352 size_t frame_len)); | 352 size_t frame_len)); |
353 MOCK_METHOD0(IsHandshakeComplete, bool()); | 353 MOCK_METHOD0(IsHandshakeComplete, bool()); |
354 MOCK_METHOD0(IsCryptoHandshakeConfirmed, bool()); | 354 MOCK_METHOD0(IsCryptoHandshakeConfirmed, bool()); |
355 | 355 |
| 356 using QuicSession::ActivateStream; |
| 357 |
356 private: | 358 private: |
357 DISALLOW_COPY_AND_ASSIGN(MockSession); | 359 DISALLOW_COPY_AND_ASSIGN(MockSession); |
358 }; | 360 }; |
359 | 361 |
360 class TestSession : public QuicSession { | 362 class TestSession : public QuicSession { |
361 public: | 363 public: |
362 TestSession(QuicConnection* connection, const QuicConfig& config); | 364 TestSession(QuicConnection* connection, const QuicConfig& config); |
363 virtual ~TestSession(); | 365 virtual ~TestSession(); |
364 | 366 |
365 MOCK_METHOD1(CreateIncomingDataStream, QuicDataStream*(QuicStreamId id)); | 367 MOCK_METHOD1(CreateIncomingDataStream, QuicDataStream*(QuicStreamId id)); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 | 466 |
465 protected: | 467 protected: |
466 // Object is ref counted. | 468 // Object is ref counted. |
467 virtual ~MockAckNotifierDelegate(); | 469 virtual ~MockAckNotifierDelegate(); |
468 }; | 470 }; |
469 | 471 |
470 } // namespace test | 472 } // namespace test |
471 } // namespace net | 473 } // namespace net |
472 | 474 |
473 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ | 475 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ |
OLD | NEW |