OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |