summaryrefslogtreecommitdiffstats
path: root/webkit/support
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-23 21:41:16 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-23 21:41:16 +0000
commitca6667890dde9c98fc1ad8203f002757ea740110 (patch)
tree78e095e67430c8ab873c6198e9e9449cd04b9295 /webkit/support
parent72a7922929363288647ccce827a56a752be66c24 (diff)
downloadchromium_src-ca6667890dde9c98fc1ad8203f002757ea740110.zip
chromium_src-ca6667890dde9c98fc1ad8203f002757ea740110.tar.gz
chromium_src-ca6667890dde9c98fc1ad8203f002757ea740110.tar.bz2
Extend simple_file_system to use SandboxedFileSystemOperation
so that most of the code paths that run in chromium can be tested in test_shell. Also removed SandboxedFileSystemContext::CheckIfFilePathIsSafe that is not used at all. BUG=60243 TEST=fast/filesystem Review URL: http://codereview.chromium.org/4879001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r--webkit/support/webkit_support.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index f6d0b24..55550de 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -48,6 +48,7 @@
#include "webkit/support/test_webplugin_page_delegate.h"
#include "webkit/support/test_webkit_client.h"
#include "webkit/tools/test_shell/simple_database_system.h"
+#include "webkit/tools/test_shell/simple_file_system.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
using WebKit::WebCString;
@@ -543,18 +544,11 @@ WebURL GetDevToolsPathAsURL() {
}
// FileSystem
-void OpenFileSystem(WebFrame*, WebFileSystem::Type type,
- long long, bool, WebFileSystemCallbacks* callbacks) {
- // TODO(kinuko): hook up FileSystemPathManager in a way that the code could
- // be shared with test_shell.
- if (test_environment->webkit_client()->file_system_root().empty()) {
- callbacks->didFail(WebKit::WebFileErrorSecurity);
- } else {
- callbacks->didOpenFileSystem(
- "TestShellFileSystem",
- webkit_glue::FilePathToWebString(
- test_environment->webkit_client()->file_system_root()));
- }
+void OpenFileSystem(WebFrame* frame, WebFileSystem::Type type,
+ long long size, bool create, WebFileSystemCallbacks* callbacks) {
+ SimpleFileSystem* fileSystem = static_cast<SimpleFileSystem*>(
+ test_environment->webkit_client()->fileSystem());
+ fileSystem->OpenFileSystem(frame, type, size, create, callbacks);
}
} // namespace webkit_support