diff options
Diffstat (limited to 'webkit/support/test_webkit_client.h')
-rw-r--r-- | webkit/support/test_webkit_client.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/webkit/support/test_webkit_client.h b/webkit/support/test_webkit_client.h index 7a2a052..c1415ab 100644 --- a/webkit/support/test_webkit_client.h +++ b/webkit/support/test_webkit_client.h @@ -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 @@ class TestWebKitClient : public webkit_glue::WebKitClientImpl { 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,11 +70,7 @@ class TestWebKitClient : public webkit_glue::WebKitClientImpl { SimpleAppCacheSystem appcache_system_; SimpleDatabaseSystem database_system_; SimpleWebCookieJarImpl cookie_jar_; - - // Used to create WebURLLoader. - // If NULL, the class defers to webkit_glue::WebKitClientImpl for creating the - // WebURLLoader. - WebURLLoaderFactory* url_loader_factory_; + WebURLLoaderMockFactory url_loader_factory_; #if defined(OS_WIN) WebKit::WebThemeEngine* active_theme_engine_; |