summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/support/webkit_support.gypi1
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc15
-rw-r--r--webkit/tools/test_shell/test_shell.cc14
3 files changed, 16 insertions, 14 deletions
diff --git a/webkit/support/webkit_support.gypi b/webkit/support/webkit_support.gypi
index d052566..2aa5d6a 100644
--- a/webkit/support/webkit_support.gypi
+++ b/webkit/support/webkit_support.gypi
@@ -16,6 +16,7 @@
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/testing/gtest.gyp:gtest',
'appcache',
+ 'blob',
'database',
'glue',
],
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index c6a66a3..dc11e91 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -58,8 +58,10 @@
#include "net/socket/ssl_client_socket_nss_factory.h"
#endif
#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_job.h"
#include "webkit/appcache/appcache_interfaces.h"
#include "webkit/blob/blob_storage_controller.h"
+#include "webkit/blob/blob_url_request_job.h"
#include "webkit/glue/resource_loader_bridge.h"
#include "webkit/tools/test_shell/simple_appcache_system.h"
#include "webkit/tools/test_shell/simple_socket_stream_bridge.h"
@@ -88,6 +90,17 @@ struct TestShellRequestContextParams {
bool accept_all_cookies;
};
+static URLRequestJob* BlobURLRequestJobFactory(URLRequest* request,
+ const std::string& scheme) {
+ webkit_blob::BlobStorageController* blob_storage_controller =
+ static_cast<TestShellRequestContext*>(request->context())->
+ blob_storage_controller();
+ return new webkit_blob::BlobURLRequestJob(
+ request,
+ blob_storage_controller->GetBlobDataFromUrl(request->url()),
+ NULL);
+}
+
TestShellRequestContextParams* g_request_context_params = NULL;
URLRequestContext* g_request_context = NULL;
base::Thread* g_cache_thread = NULL;
@@ -123,9 +136,11 @@ class IOThread : public base::Thread {
SimpleAppCacheSystem::InitializeOnIOThread(g_request_context);
SimpleSocketStreamBridge::InitializeOnIOThread(g_request_context);
+
TestShellWebBlobRegistryImpl::InitializeOnIOThread(
static_cast<TestShellRequestContext*>(g_request_context)->
blob_storage_controller());
+ URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory);
}
virtual void CleanUp() {
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 1ef481d..53e3071 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -44,8 +44,6 @@
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
-#include "webkit/blob/blob_storage_controller.h"
-#include "webkit/blob/blob_url_request_job.h"
#include "webkit/glue/glue_serialize.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpreferences.h"
@@ -104,16 +102,6 @@ class URLRequestTestShellFileJob : public URLRequestFileJob {
DISALLOW_COPY_AND_ASSIGN(URLRequestTestShellFileJob);
};
-URLRequestJob* BlobURLRequestJobFactory(URLRequest* request,
- const std::string& scheme) {
- webkit_blob::BlobStorageController* blob_storage_controller =
- static_cast<TestShellRequestContext*>(request->context())->
- blob_storage_controller();
- return new webkit_blob::BlobURLRequestJob(
- request,
- blob_storage_controller->GetBlobDataFromUrl(request->url()),
- NULL);
-}
} // namespace
@@ -158,8 +146,6 @@ TestShell::TestShell()
&URLRequestTestShellFileJob::InspectorFactory);
url_util::AddStandardScheme("test-shell-resource");
- URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory);
-
if (!file_system_root_.CreateUniqueTempDir()) {
LOG(WARNING) << "Failed to create a temp dir for the filesystem."
"FileSystem feature will be disabled.";