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

Side by Side Diff: net/http/http_transaction_test_util.h

Issue 1467603002: URLRequestJob: change ReadRawData contract (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add done_reading_called_ to MockNetworkTransaction Created 5 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 5 #ifndef NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 6 #define NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
7 7
8 #include "net/http/http_transaction.h" 8 #include "net/http/http_transaction.h"
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 CreateHelper* websocket_handshake_stream_create_helper_; 261 CreateHelper* websocket_handshake_stream_create_helper_;
262 base::WeakPtr<MockNetworkLayer> transaction_factory_; 262 base::WeakPtr<MockNetworkLayer> transaction_factory_;
263 int64_t received_bytes_; 263 int64_t received_bytes_;
264 int64_t sent_bytes_; 264 int64_t sent_bytes_;
265 265
266 // NetLog ID of the fake / non-existent underlying socket used by the 266 // NetLog ID of the fake / non-existent underlying socket used by the
267 // connection. Requires Start() be passed a BoundNetLog with a real NetLog to 267 // connection. Requires Start() be passed a BoundNetLog with a real NetLog to
268 // be initialized. 268 // be initialized.
269 unsigned int socket_log_id_; 269 unsigned int socket_log_id_;
270 270
271 bool done_reading_called_;
272
271 base::WeakPtrFactory<MockNetworkTransaction> weak_factory_; 273 base::WeakPtrFactory<MockNetworkTransaction> weak_factory_;
272 274
273 }; 275 };
274 276
275 class MockNetworkLayer : public HttpTransactionFactory, 277 class MockNetworkLayer : public HttpTransactionFactory,
276 public base::SupportsWeakPtr<MockNetworkLayer> { 278 public base::SupportsWeakPtr<MockNetworkLayer> {
277 public: 279 public:
278 MockNetworkLayer(); 280 MockNetworkLayer();
279 ~MockNetworkLayer() override; 281 ~MockNetworkLayer() override;
280 282
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 335
334 //----------------------------------------------------------------------------- 336 //-----------------------------------------------------------------------------
335 // helpers 337 // helpers
336 338
337 // read the transaction completely 339 // read the transaction completely
338 int ReadTransaction(HttpTransaction* trans, std::string* result); 340 int ReadTransaction(HttpTransaction* trans, std::string* result);
339 341
340 } // namespace net 342 } // namespace net
341 343
342 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_ 344 #endif // NET_HTTP_HTTP_TRANSACTION_UNITTEST_H_
OLDNEW
« no previous file with comments | « mojo/services/network/url_loader_impl_apptest.cc ('k') | net/http/http_transaction_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698