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

Side by Side Diff: webkit/support/webkit_support.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/support/webkit_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ 5 #ifndef WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_
6 #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ 6 #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 const WebKit::WebGraphicsContext3D::Attributes& attributes, 118 const WebKit::WebGraphicsContext3D::Attributes& attributes,
119 WebKit::WebView* web_view); 119 WebKit::WebView* web_view);
120 120
121 // ------- URL load mocking. 121 // ------- URL load mocking.
122 // Registers the file at |file_path| to be served when |url| is requested. 122 // Registers the file at |file_path| to be served when |url| is requested.
123 // |response| is the response provided with the contents. 123 // |response| is the response provided with the contents.
124 void RegisterMockedURL(const WebKit::WebURL& url, 124 void RegisterMockedURL(const WebKit::WebURL& url,
125 const WebKit::WebURLResponse& response, 125 const WebKit::WebURLResponse& response,
126 const WebKit::WebString& file_path); 126 const WebKit::WebString& file_path);
127 127
128 // Registers the error to be returned when |url| is requested.
129 void RegisterMockedErrorURL(const WebKit::WebURL& url,
130 const WebKit::WebURLResponse& response,
131 const WebKit::WebURLError& error);
132
128 // Unregisters URLs so they are no longer mocked. 133 // Unregisters URLs so they are no longer mocked.
129 void UnregisterMockedURL(const WebKit::WebURL& url); 134 void UnregisterMockedURL(const WebKit::WebURL& url);
130 void UnregisterAllMockedURLs(); 135 void UnregisterAllMockedURLs();
131 136
132 // Causes all pending asynchronous requests to be served. When this method 137 // Causes all pending asynchronous requests to be served. When this method
133 // returns all the pending requests have been processed. 138 // returns all the pending requests have been processed.
134 void ServeAsynchronousMockedRequests(); 139 void ServeAsynchronousMockedRequests();
135 140
136 // Returns the last request that handled by |ServeAsynchronousMockedRequests()|. 141 // Returns the last request that handled by |ServeAsynchronousMockedRequests()|.
137 WebKit::WebURLRequest GetLastHandledAsynchronousMockedRequest(); 142 WebKit::WebURLRequest GetLastHandledAsynchronousMockedRequest();
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 269
265 void EnableWebCoreLogChannels(const std::string& channels); 270 void EnableWebCoreLogChannels(const std::string& channels);
266 271
267 // - Gamepad 272 // - Gamepad
268 273
269 void SetGamepadData(const WebKit::WebGamepads& pads); 274 void SetGamepadData(const WebKit::WebGamepads& pads);
270 275
271 } // namespace webkit_support 276 } // namespace webkit_support
272 277
273 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_ 278 #endif // WEBKIT_SUPPORT_WEBKIT_SUPPORT_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/support/webkit_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698