Index: content/test/net/url_request_failed_job.h |
=================================================================== |
--- content/test/net/url_request_failed_job.h (revision 226965) |
+++ content/test/net/url_request_failed_job.h (working copy) |
@@ -26,6 +26,7 @@ |
// Adds the testing URLs to the net::URLRequestFilter. |
static void AddUrlHandler(); |
+ static void AddUrlHandlerForHostname(const std::string& hostname); |
// Given a net error code, constructs a mock URL that will return that error |
// asynchronously when started. |net_error| must be a valid net error code |
@@ -33,6 +34,13 @@ |
static GURL GetMockHttpUrl(int net_error); |
static GURL GetMockHttpsUrl(int net_error); |
+ // URLRequestFailedJob must be added as a handler for |hostname| for |
+ // the returned URL to return |net_error|. |
+ static GURL GetMockHttpUrlForHostname(int net_error, |
+ const std::string& hostname); |
+ static GURL GetMockHttpsUrlForHostname(int net_error, |
+ const std::string& hostname); |
+ |
private: |
static net::URLRequestJob* Factory(net::URLRequest* request, |
net::NetworkDelegate* network_delegate, |