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 c4cd4c66be5a755979cc387c34f5443636593df3..aea9bc15eac37127709d956b574d845aeac0efcc 100644 |
--- a/net/http/http_transaction_test_util.h |
+++ b/net/http/http_transaction_test_util.h |
@@ -241,6 +241,10 @@ class MockNetworkTransaction |
CreateHelper* websocket_handshake_stream_create_helper() { |
return websocket_handshake_stream_create_helper_; |
} |
+ |
+ // Error to return on a future Read call. |
+ void SetReadError(int error); |
jkarlin
2017/06/28 15:50:11
What calls this? I don't see anything in the CL.
|
+ |
RequestPriority priority() const { return priority_; } |
const HttpRequestInfo* request() const { return request_; } |
@@ -282,6 +286,11 @@ class MockNetworkTransaction |
CompletionCallback resume_start_callback_; // used for pause and restart. |
+ // Error to be returned from Read. If set it will override all Read logic and |
+ // simply return the error code (synchronously/asynchronously based on test |
+ // mode). |
Randy Smith (Not in Mondays)
2017/06/27 18:49:38
This is part of the interface, not the implementat
shivanisha
2017/06/28 18:02:33
Added the error code in MockTransaction and now it
|
+ int read_error_; |
+ |
base::WeakPtrFactory<MockNetworkTransaction> weak_factory_; |
}; |