Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1359)

Side by Side Diff: net/quic/test_tools/quic_test_utils.h

Issue 127633002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 MockPacketWriter(); 383 MockPacketWriter();
384 virtual ~MockPacketWriter(); 384 virtual ~MockPacketWriter();
385 385
386 MOCK_METHOD5(WritePacket, 386 MOCK_METHOD5(WritePacket,
387 WriteResult(const char* buffer, 387 WriteResult(const char* buffer,
388 size_t buf_len, 388 size_t buf_len,
389 const IPAddressNumber& self_address, 389 const IPAddressNumber& self_address,
390 const IPEndPoint& peer_address, 390 const IPEndPoint& peer_address,
391 QuicBlockedWriterInterface* blocked_writer)); 391 QuicBlockedWriterInterface* blocked_writer));
392 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); 392 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool());
393 MOCK_CONST_METHOD0(IsWriteBlocked, bool());
394 MOCK_METHOD0(SetWritable, void());
393 }; 395 };
394 396
395 class MockSendAlgorithm : public SendAlgorithmInterface { 397 class MockSendAlgorithm : public SendAlgorithmInterface {
396 public: 398 public:
397 MockSendAlgorithm(); 399 MockSendAlgorithm();
398 virtual ~MockSendAlgorithm(); 400 virtual ~MockSendAlgorithm();
399 401
400 MOCK_METHOD2(SetFromConfig, void(const QuicConfig& config, bool is_server)); 402 MOCK_METHOD2(SetFromConfig, void(const QuicConfig& config, bool is_server));
401 MOCK_METHOD1(SetMaxPacketSize, void(QuicByteCount max_packet_size)); 403 MOCK_METHOD1(SetMaxPacketSize, void(QuicByteCount max_packet_size));
402 MOCK_METHOD3(OnIncomingQuicCongestionFeedbackFrame, 404 MOCK_METHOD3(OnIncomingQuicCongestionFeedbackFrame,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 bool error() { return error_; } 456 bool error() { return error_; }
455 457
456 private: 458 private:
457 string data_; 459 string data_;
458 bool error_; 460 bool error_;
459 }; 461 };
460 462
461 class MockAckNotifierDelegate : public QuicAckNotifier::DelegateInterface { 463 class MockAckNotifierDelegate : public QuicAckNotifier::DelegateInterface {
462 public: 464 public:
463 MockAckNotifierDelegate(); 465 MockAckNotifierDelegate();
464 virtual ~MockAckNotifierDelegate();
465 466
466 MOCK_METHOD0(OnAckNotification, void()); 467 MOCK_METHOD0(OnAckNotification, void());
468
469 protected:
470 // Object is ref counted.
471 virtual ~MockAckNotifierDelegate();
467 }; 472 };
468 473
469 } // namespace test 474 } // namespace test
470 } // namespace net 475 } // namespace net
471 476
472 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 477 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_sent_packet_manager_peer.cc ('k') | net/quic/test_tools/quic_test_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698