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

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

Issue 340433002: Port QuicServer to Chrome network stack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments and fix blocked writers using callbacks Created 6 years, 6 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
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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 QuicCryptoStream* crypto_stream_; 392 QuicCryptoStream* crypto_stream_;
393 393
394 DISALLOW_COPY_AND_ASSIGN(TestClientSession); 394 DISALLOW_COPY_AND_ASSIGN(TestClientSession);
395 }; 395 };
396 396
397 class MockPacketWriter : public QuicPacketWriter { 397 class MockPacketWriter : public QuicPacketWriter {
398 public: 398 public:
399 MockPacketWriter(); 399 MockPacketWriter();
400 virtual ~MockPacketWriter(); 400 virtual ~MockPacketWriter();
401 401
402 MOCK_METHOD4(WritePacket, 402 MOCK_METHOD5(WritePacket,
403 WriteResult(const char* buffer, 403 WriteResult(const char* buffer,
404 size_t buf_len, 404 size_t buf_len,
405 const IPAddressNumber& self_address, 405 const IPAddressNumber& self_address,
406 const IPEndPoint& peer_address)); 406 const IPEndPoint& peer_address,
407 base::Callback<void(WriteResult wr)> callback));
407 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); 408 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool());
408 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); 409 MOCK_CONST_METHOD0(IsWriteBlocked, bool());
409 MOCK_METHOD0(SetWritable, void()); 410 MOCK_METHOD0(SetWritable, void());
410 411
411 private: 412 private:
412 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); 413 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter);
413 }; 414 };
414 415
415 class MockSendAlgorithm : public SendAlgorithmInterface { 416 class MockSendAlgorithm : public SendAlgorithmInterface {
416 public: 417 public:
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 virtual ~MockAckNotifierDelegate(); 502 virtual ~MockAckNotifierDelegate();
502 503
503 private: 504 private:
504 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); 505 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate);
505 }; 506 };
506 507
507 } // namespace test 508 } // namespace test
508 } // namespace net 509 } // namespace net
509 510
510 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 511 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698