| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" | 5 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 "000" PS "p", NULL }, | 65 "000" PS "p", NULL }, |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 FileSystemURL CreateFileSystemURL(const char* path) { | 68 FileSystemURL CreateFileSystemURL(const char* path) { |
| 69 const GURL kOrigin("http://foo/"); | 69 const GURL kOrigin("http://foo/"); |
| 70 return FileSystemURL::CreateForTest( | 70 return FileSystemURL::CreateForTest( |
| 71 kOrigin, kFileSystemTypeTemporary, base::FilePath::FromUTF8Unsafe(path)); | 71 kOrigin, kFileSystemTypeTemporary, base::FilePath::FromUTF8Unsafe(path)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void DidOpenFileSystem(base::PlatformFileError* error_out, | 74 void DidOpenFileSystem(base::PlatformFileError* error_out, |
| 75 const GURL& origin_url, |
| 76 const std::string& name, |
| 75 base::PlatformFileError error) { | 77 base::PlatformFileError error) { |
| 76 *error_out = error; | 78 *error_out = error; |
| 77 } | 79 } |
| 78 | 80 |
| 79 } // namespace | 81 } // namespace |
| 80 | 82 |
| 81 class SandboxFileSystemBackendTest : public testing::Test { | 83 class SandboxFileSystemBackendTest : public testing::Test { |
| 82 protected: | 84 protected: |
| 83 virtual void SetUp() { | 85 virtual void SetUp() { |
| 84 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 86 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, | 350 OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, |
| 349 &root_path)); | 351 &root_path)); |
| 350 base::FilePath expected = file_system_path().AppendASCII( | 352 base::FilePath expected = file_system_path().AppendASCII( |
| 351 kRootPathFileURITestCases[i].expected_path); | 353 kRootPathFileURITestCases[i].expected_path); |
| 352 EXPECT_EQ(expected.value(), root_path.value()); | 354 EXPECT_EQ(expected.value(), root_path.value()); |
| 353 EXPECT_TRUE(file_util::DirectoryExists(root_path)); | 355 EXPECT_TRUE(file_util::DirectoryExists(root_path)); |
| 354 } | 356 } |
| 355 } | 357 } |
| 356 | 358 |
| 357 } // namespace fileapi | 359 } // namespace fileapi |
| OLD | NEW |