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

Unified Diff: webkit/support/test_webkit_client.h

Issue 2749020: Adding a way to mock WebURLLoader in webkit_support.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | « no previous file | webkit/support/test_webkit_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/test_webkit_client.h
===================================================================
--- webkit/support/test_webkit_client.h (revision 50359)
+++ webkit/support/test_webkit_client.h (working copy)
@@ -7,20 +7,13 @@
#include "webkit/glue/webfilesystem_impl.h"
#include "webkit/glue/webkitclient_impl.h"
+#include "webkit/support/weburl_loader_mock_factory.h"
#include "webkit/tools/test_shell/mock_webclipboard_impl.h"
#include "webkit/tools/test_shell/simple_appcache_system.h"
#include "webkit/tools/test_shell/simple_database_system.h"
#include "webkit/tools/test_shell/simple_webcookiejar_impl.h"
#include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h"
-class WebURLLoaderFactory {
- public:
- virtual WebKit::WebURLLoader* createURLLoader() = 0;
-
- protected:
- virtual ~WebURLLoaderFactory() {}
-};
-
// An implementation of WebKitClient for tests.
class TestWebKitClient : public webkit_glue::WebKitClientImpl {
public:
@@ -65,11 +58,8 @@
virtual WebKit::WebSharedWorkerRepository* sharedWorkerRepository();
virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D();
- // Sets the factory used to create WebURLLoader instances.
- // The caller owns the WebURLLoaderFactory and is responsible for calling this
- // method again with NULL when it's done.
- void set_url_loader_factory(WebURLLoaderFactory* url_loader_factory) {
- url_loader_factory_ = url_loader_factory;
+ WebURLLoaderMockFactory* url_loader_factory() {
+ return &url_loader_factory_;
}
private:
@@ -80,12 +70,8 @@
SimpleAppCacheSystem appcache_system_;
SimpleDatabaseSystem database_system_;
SimpleWebCookieJarImpl cookie_jar_;
+ WebURLLoaderMockFactory url_loader_factory_;
- // Used to create WebURLLoader.
- // If NULL, the class defers to webkit_glue::WebKitClientImpl for creating the
- // WebURLLoader.
- WebURLLoaderFactory* url_loader_factory_;
-
#if defined(OS_WIN)
WebKit::WebThemeEngine* active_theme_engine_;
#endif
« no previous file with comments | « no previous file | webkit/support/test_webkit_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698