OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/fileapi/sandbox_mount_point_provider.h" | 5 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "webkit/fileapi/file_system_context.h" | 21 #include "webkit/fileapi/file_system_context.h" |
22 #include "webkit/fileapi/file_system_operation_context.h" | 22 #include "webkit/fileapi/file_system_operation_context.h" |
23 #include "webkit/fileapi/file_system_path_manager.h" | 23 #include "webkit/fileapi/file_system_path_manager.h" |
24 #include "webkit/fileapi/file_system_util.h" | 24 #include "webkit/fileapi/file_system_util.h" |
25 | 25 |
26 namespace fileapi { | 26 namespace fileapi { |
27 | 27 |
28 class MockFileSystemPathManager : public FileSystemPathManager { | 28 class MockFileSystemPathManager : public FileSystemPathManager { |
29 public: | 29 public: |
30 explicit MockFileSystemPathManager(const FilePath& profile_path) | 30 explicit MockFileSystemPathManager(const FilePath& profile_path) |
31 : FileSystemPathManager(base::MessageLoopProxy::CreateForCurrentThread(), | 31 : FileSystemPathManager(base::MessageLoopProxy::current(), |
32 profile_path, NULL, false, true) {} | 32 profile_path, NULL, false, true) {} |
33 }; | 33 }; |
34 | 34 |
35 class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test { | 35 class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test { |
36 public: | 36 public: |
37 void SetUp() { | 37 void SetUp() { |
38 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 38 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
39 path_manager_.reset(new MockFileSystemPathManager(data_dir_.path())); | 39 path_manager_.reset(new MockFileSystemPathManager(data_dir_.path())); |
40 } | 40 } |
41 | 41 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 public: | 154 public: |
155 SandboxMountPointProviderMigrationTest() : | 155 SandboxMountPointProviderMigrationTest() : |
156 ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { | 156 ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { |
157 } | 157 } |
158 | 158 |
159 void SetUp() { | 159 void SetUp() { |
160 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); | 160 ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); |
161 path_manager_ = new MockFileSystemPathManager(data_dir_.path()); | 161 path_manager_ = new MockFileSystemPathManager(data_dir_.path()); |
162 | 162 |
163 file_system_context_ = new FileSystemContext( | 163 file_system_context_ = new FileSystemContext( |
164 base::MessageLoopProxy::CreateForCurrentThread(), | 164 base::MessageLoopProxy::current(), |
165 base::MessageLoopProxy::CreateForCurrentThread(), | 165 base::MessageLoopProxy::current(), |
166 new TestSpecialStoragePolicy(true /* unlimited quota */), | 166 new TestSpecialStoragePolicy(true /* unlimited quota */), |
167 NULL, | 167 NULL, |
168 data_dir_.path(), | 168 data_dir_.path(), |
169 false, // incognito | 169 false, // incognito |
170 true, // allow_file_access_from_files | 170 true, // allow_file_access_from_files |
171 true, // unlimited quota | 171 true, // unlimited quota |
172 path_manager_); | 172 path_manager_); |
173 } | 173 } |
174 | 174 |
175 FileSystemPathManager* path_manager() { | 175 FileSystemPathManager* path_manager() { |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 416 |
417 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod8) { | 417 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod8) { |
418 RunMigrationTest(8); | 418 RunMigrationTest(8); |
419 } | 419 } |
420 | 420 |
421 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod9) { | 421 TEST_F(SandboxMountPointProviderMigrationTest, TestMigrateViaMethod9) { |
422 RunMigrationTest(9); | 422 RunMigrationTest(9); |
423 } | 423 } |
424 | 424 |
425 } // namespace fileapi | 425 } // namespace fileapi |
OLD | NEW |