| 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // For External filesystem. | 104 // For External filesystem. |
| 105 const base::FilePath::CharType kMountPoint[] = FILE_PATH_LITERAL("/tmp/testing")
; | 105 const base::FilePath::CharType kMountPoint[] = FILE_PATH_LITERAL("/tmp/testing")
; |
| 106 const base::FilePath::CharType kRootPath[] = FILE_PATH_LITERAL("/tmp"); | 106 const base::FilePath::CharType kRootPath[] = FILE_PATH_LITERAL("/tmp"); |
| 107 const base::FilePath::CharType kVirtualPath[] = FILE_PATH_LITERAL("testing"); | 107 const base::FilePath::CharType kVirtualPath[] = FILE_PATH_LITERAL("testing"); |
| 108 | 108 |
| 109 } // namespace | 109 } // namespace |
| 110 | 110 |
| 111 class FileSystemMountPointProviderTest : public testing::Test { | 111 class FileSystemMountPointProviderTest : public testing::Test { |
| 112 public: | 112 public: |
| 113 FileSystemMountPointProviderTest() | 113 FileSystemMountPointProviderTest() |
| 114 : ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 114 : weak_factory_(this) { |
| 115 } | 115 } |
| 116 | 116 |
| 117 virtual void SetUp() { | 117 virtual void SetUp() { |
| 118 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 118 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
| 119 special_storage_policy_ = new quota::MockSpecialStoragePolicy; | 119 special_storage_policy_ = new quota::MockSpecialStoragePolicy; |
| 120 } | 120 } |
| 121 | 121 |
| 122 protected: | 122 protected: |
| 123 void SetupNewContext(const FileSystemOptions& options) { | 123 void SetupNewContext(const FileSystemOptions& options) { |
| 124 scoped_refptr<ExternalMountPoints> external_mount_points( | 124 scoped_refptr<ExternalMountPoints> external_mount_points( |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 kRootPathFileURITestCases[i].type, | 298 kRootPathFileURITestCases[i].type, |
| 299 true /* create */, &root_path)); | 299 true /* create */, &root_path)); |
| 300 base::FilePath expected = file_system_path().AppendASCII( | 300 base::FilePath expected = file_system_path().AppendASCII( |
| 301 kRootPathFileURITestCases[i].expected_path); | 301 kRootPathFileURITestCases[i].expected_path); |
| 302 EXPECT_EQ(expected.value(), root_path.value()); | 302 EXPECT_EQ(expected.value(), root_path.value()); |
| 303 EXPECT_TRUE(file_util::DirectoryExists(root_path)); | 303 EXPECT_TRUE(file_util::DirectoryExists(root_path)); |
| 304 } | 304 } |
| 305 } | 305 } |
| 306 | 306 |
| 307 } // namespace fileapi | 307 } // namespace fileapi |
| OLD | NEW |