summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_operation_unittest.cc
diff options
context:
space:
mode:
authoradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-19 23:39:56 +0000
committeradamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-19 23:39:56 +0000
commit483cad04e9efc1b42f8b2b5b118a95a5650d3c3e (patch)
tree9b36f45f614a08e6c81798bb093101181dec195c /webkit/fileapi/file_system_operation_unittest.cc
parent048a1d02a9e9e42e63df1a26417d3f79494afb7c (diff)
downloadchromium_src-483cad04e9efc1b42f8b2b5b118a95a5650d3c3e.zip
chromium_src-483cad04e9efc1b42f8b2b5b118a95a5650d3c3e.tar.gz
chromium_src-483cad04e9efc1b42f8b2b5b118a95a5650d3c3e.tar.bz2
Use appropriate FileSystemOperations in "filesystem:" URLRequestJobs.
FileSystemURLRequestJob now calls GetMetadata(), while FileSystemDirURLRequestJob calls ReadDirectory(). With neither calling GetLocalPath(), the need for FileSystemURLRequestJobBase has disappeared, as has the need for FileSystemOperation::GetLocalPath and FileSystemCallbackDispatcher::DidGetLocalPath(). The only changes in behavior due to this patch are: - ReadDirectory is now called on the URL, so it will still work properly after the obsfuscated filesystem is in use. - FileSystemDirURLRequestJob has been fixed to show a directory header. This was somehow lost in the refactor to use FileSystemURLRequestJobBase. - The error codes for "file not found" are now always net::ERR_FILE_NOT_FOUND. R=ericu@chromium.org Review URL: http://codereview.chromium.org/7047013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86015 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_operation_unittest.cc')
-rw-r--r--webkit/fileapi/file_system_operation_unittest.cc19
1 files changed, 0 insertions, 19 deletions
diff --git a/webkit/fileapi/file_system_operation_unittest.cc b/webkit/fileapi/file_system_operation_unittest.cc
index 0161362..3e349d6 100644
--- a/webkit/fileapi/file_system_operation_unittest.cc
+++ b/webkit/fileapi/file_system_operation_unittest.cc
@@ -186,11 +186,6 @@ class MockDispatcher : public FileSystemCallbackDispatcher {
test_->set_status(base::PLATFORM_FILE_OK);
}
- virtual void DidGetLocalPath(const FilePath& local_path) {
- test_->set_local_path(local_path);
- test_->set_status(base::PLATFORM_FILE_OK);
- }
-
virtual void DidReadMetadata(
const base::PlatformFileInfo& info,
const FilePath& platform_path) {
@@ -659,20 +654,6 @@ TEST_F(FileSystemOperationTest, TestExistsAndMetadataSuccess) {
EXPECT_EQ(PlatformPath(file_path), path());
}
-TEST_F(FileSystemOperationTest, TestGetLocalFilePathSuccess) {
- FilePath dir_path(CreateVirtualTemporaryDir());
- operation()->GetLocalPath(URLForPath(dir_path));
- MessageLoop::current()->RunAllPending();
- EXPECT_EQ(base::PLATFORM_FILE_OK, status());
- EXPECT_EQ(local_path().value(), PlatformPath(dir_path).value());
-
- FilePath file_path(CreateVirtualTemporaryFileInDir(dir_path));
- operation()->GetLocalPath(URLForPath(file_path));
- MessageLoop::current()->RunAllPending();
- EXPECT_EQ(base::PLATFORM_FILE_OK, status());
- EXPECT_EQ(local_path().value(), PlatformPath(file_path).value());
-}
-
TEST_F(FileSystemOperationTest, TestTypeMismatchErrors) {
FilePath dir_path(CreateVirtualTemporaryDir());
operation()->FileExists(URLForPath(dir_path));