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

Unified Diff: webkit/support/weburl_loader_mock_factory.h

Issue 10821019: Add support for mocking failed loads to WebURLLoaderMock. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/support/weburl_loader_mock.cc ('k') | webkit/support/weburl_loader_mock_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/weburl_loader_mock_factory.h
===================================================================
--- webkit/support/weburl_loader_mock_factory.h (revision 148351)
+++ webkit/support/weburl_loader_mock_factory.h (working copy)
@@ -43,6 +43,11 @@
const WebKit::WebURLResponse& response,
const WebKit::WebString& filePath);
+ // Registers an error to be served when the specified URL is requested.
+ void RegisterErrorURL(const WebKit::WebURL& url,
+ const WebKit::WebURLResponse& response,
+ const WebKit::WebURLError& error);
+
// Unregisters |url| so it will no longer be mocked.
void UnregisterURL(const WebKit::WebURL& url);
@@ -90,6 +95,9 @@
typedef std::map<WebURLLoaderMock*, WebKit::WebURLRequest> LoaderToRequestMap;
LoaderToRequestMap pending_loaders_;
+ typedef std::map<WebKit::WebURL, WebKit::WebURLError> URLToErrorMap;
+ URLToErrorMap url_to_error_info_;
+
// Table of the registered URLs and the responses that they should receive.
typedef std::map<WebKit::WebURL, ResponseInfo> URLToResponseMap;
URLToResponseMap url_to_reponse_info_;
« no previous file with comments | « webkit/support/weburl_loader_mock.cc ('k') | webkit/support/weburl_loader_mock_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698