| Index: net/http/http_transaction_test_util.h
|
| diff --git a/net/http/http_transaction_test_util.h b/net/http/http_transaction_test_util.h
|
| index 52b38e845decee9b81b9ba93d0b43645f09b09d7..24e16c8a6430fd0d25e52af6bdba91d342d1ec1b 100644
|
| --- a/net/http/http_transaction_test_util.h
|
| +++ b/net/http/http_transaction_test_util.h
|
| @@ -50,10 +50,14 @@ enum {
|
| TEST_MODE_SLOW_READ = 1 << 5
|
| };
|
|
|
| -typedef void (*MockTransactionHandler)(const HttpRequestInfo* request,
|
| - std::string* response_status,
|
| - std::string* response_headers,
|
| - std::string* response_data);
|
| +using MockTransactionReadHandler = int (*)(int64 content_length,
|
| + int64 offset,
|
| + IOBuffer* buf,
|
| + int buf_len);
|
| +using MockTransactionHandler = void (*)(const HttpRequestInfo* request,
|
| + std::string* response_status,
|
| + std::string* response_headers,
|
| + std::string* response_data);
|
|
|
| struct MockTransaction {
|
| const char* url;
|
| @@ -69,6 +73,7 @@ struct MockTransaction {
|
| const char* data;
|
| int test_mode;
|
| MockTransactionHandler handler;
|
| + MockTransactionReadHandler read_handler;
|
| scoped_refptr<X509Certificate> cert;
|
| CertStatus cert_status;
|
| int ssl_connection_status;
|
| @@ -240,10 +245,13 @@ class MockNetworkTransaction
|
| const HttpRequestInfo* request_;
|
| HttpResponseInfo response_;
|
| std::string data_;
|
| - int data_cursor_;
|
| + int64 data_cursor_;
|
| + int64 content_length_;
|
| int test_mode_;
|
| RequestPriority priority_;
|
| + MockTransactionReadHandler read_handler_;
|
| CreateHelper* websocket_handshake_stream_create_helper_;
|
| + BeforeNetworkStartCallback before_network_start_callback_;
|
| base::WeakPtr<MockNetworkLayer> transaction_factory_;
|
| int64 received_bytes_;
|
|
|
|
|