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

Side by Side Diff: net/tools/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_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 QuicCryptoStream* crypto_stream_; 125 QuicCryptoStream* crypto_stream_;
126 126
127 DISALLOW_COPY_AND_ASSIGN(TestSession); 127 DISALLOW_COPY_AND_ASSIGN(TestSession);
128 }; 128 };
129 129
130 class MockPacketWriter : public QuicPacketWriter { 130 class MockPacketWriter : public QuicPacketWriter {
131 public: 131 public:
132 MockPacketWriter(); 132 MockPacketWriter();
133 virtual ~MockPacketWriter(); 133 virtual ~MockPacketWriter();
134 134
135 MOCK_METHOD4(WritePacket, 135 MOCK_METHOD5(WritePacket,
136 WriteResult(const char* buffer, 136 WriteResult(const char* buffer,
137 size_t buf_len, 137 size_t buf_len,
138 const IPAddressNumber& self_address, 138 const IPAddressNumber& self_address,
139 const IPEndPoint& peer_address)); 139 const IPEndPoint& peer_address,
140 base::Callback<void(WriteResult wr)> callback));
140 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool()); 141 MOCK_CONST_METHOD0(IsWriteBlockedDataBuffered, bool());
141 MOCK_CONST_METHOD0(IsWriteBlocked, bool()); 142 MOCK_CONST_METHOD0(IsWriteBlocked, bool());
142 MOCK_METHOD0(SetWritable, void()); 143 MOCK_METHOD0(SetWritable, void());
143 144
144 private: 145 private:
145 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter); 146 DISALLOW_COPY_AND_ASSIGN(MockPacketWriter);
146 }; 147 };
147 148
148 class MockQuicServerSessionVisitor : public QuicServerSessionVisitor { 149 class MockQuicServerSessionVisitor : public QuicServerSessionVisitor {
149 public: 150 public:
(...skipping 22 matching lines...) Expand all
172 virtual ~MockAckNotifierDelegate(); 173 virtual ~MockAckNotifierDelegate();
173 174
174 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate); 175 DISALLOW_COPY_AND_ASSIGN(MockAckNotifierDelegate);
175 }; 176 };
176 177
177 } // namespace test 178 } // namespace test
178 } // namespace tools 179 } // namespace tools
179 } // namespace net 180 } // namespace net
180 181
181 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 182 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« net/quic/quic_server_test.cc ('K') | « net/tools/quic/test_tools/packet_dropping_test_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698