summaryrefslogtreecommitdiffstats
path: root/webkit/support/test_webkit_client.cc
diff options
context:
space:
mode:
authorjcivelli@google.com <jcivelli@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-21 20:54:09 +0000
committerjcivelli@google.com <jcivelli@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-21 20:54:09 +0000
commit0fbd522d848313c647d2301990ea18973d887b69 (patch)
tree1cd783a8dacbfbf640661196edb6c92a6e7c16dd /webkit/support/test_webkit_client.cc
parenta74f123ad667cade1aa366bd423f6b68c99a2a78 (diff)
downloadchromium_src-0fbd522d848313c647d2301990ea18973d887b69.zip
chromium_src-0fbd522d848313c647d2301990ea18973d887b69.tar.gz
chromium_src-0fbd522d848313c647d2301990ea18973d887b69.tar.bz2
Adding a way to mock WebURLLoader in webkit_support.
This was originally in a CL in Webkit (https://bugs.webkit.org/show_bug.cgi?id=39456) but seems to make more sense in webkit_support. BUG=None TEST=None (the above CL makes use of this). Review URL: http://codereview.chromium.org/2749020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/test_webkit_client.cc')
-rw-r--r--webkit/support/test_webkit_client.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/webkit/support/test_webkit_client.cc b/webkit/support/test_webkit_client.cc
index 389a188..0959383 100644
--- a/webkit/support/test_webkit_client.cc
+++ b/webkit/support/test_webkit_client.cc
@@ -34,6 +34,7 @@
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitclient_impl.h"
#include "webkit/support/test_webkit_client.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"
@@ -51,7 +52,7 @@
using WebKit::WebScriptController;
-TestWebKitClient::TestWebKitClient() : url_loader_factory_(NULL) {
+TestWebKitClient::TestWebKitClient() {
v8::V8::SetCounterFunction(StatsTable::FindLocation);
WebKit::initialize(this);
@@ -193,9 +194,8 @@ void TestWebKitClient::prefetchHostName(const WebKit::WebString&) {
}
WebKit::WebURLLoader* TestWebKitClient::createURLLoader() {
- if (url_loader_factory_)
- return url_loader_factory_->createURLLoader();
- return webkit_glue::WebKitClientImpl::createURLLoader();
+ return url_loader_factory_.CreateURLLoader(
+ webkit_glue::WebKitClientImpl::createURLLoader());
}
WebKit::WebData TestWebKitClient::loadResource(const char* name) {