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

Side by Side Diff: net/tools/quic/test_tools/quic_test_client.h

Issue 1746803003: Add 3 Quic e2e tests of server push. No behavior change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115218980
Patch Set: Created 4 years, 9 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
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 void WaitForWriteToFlush(); 192 void WaitForWriteToFlush();
193 193
194 EpollServer* epoll_server() { return &epoll_server_; } 194 EpollServer* epoll_server() { return &epoll_server_; }
195 195
196 void set_allow_bidirectional_data(bool value) { 196 void set_allow_bidirectional_data(bool value) {
197 allow_bidirectional_data_ = value; 197 allow_bidirectional_data_ = value;
198 } 198 }
199 199
200 bool allow_bidirectional_data() const { return allow_bidirectional_data_; } 200 bool allow_bidirectional_data() const { return allow_bidirectional_data_; }
201 201
202 size_t num_requests() const { return num_requests_; }
203
204 size_t num_responses() const { return num_responses_; }
205
202 protected: 206 protected:
203 QuicTestClient(); 207 QuicTestClient();
204 208
205 void Initialize(); 209 void Initialize();
206 210
207 void set_client(MockableQuicClient* client) { client_.reset(client); } 211 void set_client(MockableQuicClient* client) { client_.reset(client); }
208 212
209 private: 213 private:
210 class TestClientDataToResend : public QuicClient::QuicDataToResend { 214 class TestClientDataToResend : public QuicClient::QuicDataToResend {
211 public: 215 public:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Should we buffer the response body? Defaults to true. 266 // Should we buffer the response body? Defaults to true.
263 bool buffer_body_; 267 bool buffer_body_;
264 // FEC policy for data sent by this client. 268 // FEC policy for data sent by this client.
265 FecPolicy fec_policy_; 269 FecPolicy fec_policy_;
266 // When true allows the sending of a request to continue while the response is 270 // When true allows the sending of a request to continue while the response is
267 // arriving. 271 // arriving.
268 bool allow_bidirectional_data_; 272 bool allow_bidirectional_data_;
269 // For async push promise rendezvous, validation may fail in which 273 // For async push promise rendezvous, validation may fail in which
270 // case the request should be retried. 274 // case the request should be retried.
271 std::unique_ptr<TestClientDataToResend> push_promise_data_to_resend_; 275 std::unique_ptr<TestClientDataToResend> push_promise_data_to_resend_;
276 // Number of requests/responses this client has sent/received.
277 size_t num_requests_;
278 size_t num_responses_;
272 279
273 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); 280 DISALLOW_COPY_AND_ASSIGN(QuicTestClient);
274 }; 281 };
275 282
276 } // namespace test 283 } // namespace test
277 284
278 } // namespace net 285 } // namespace net
279 286
280 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ 287 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698