| 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 <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 base::MessageLoopProxy::current(), | 68 base::MessageLoopProxy::current(), |
| 69 base::MessageLoopProxy::current(), | 69 base::MessageLoopProxy::current(), |
| 70 make_scoped_refptr(new quota::MockSpecialStoragePolicy()), | 70 make_scoped_refptr(new quota::MockSpecialStoragePolicy()), |
| 71 NULL /* quota_manager */, | 71 NULL /* quota_manager */, |
| 72 data_dir_.path(), | 72 data_dir_.path(), |
| 73 CreateAllowFileAccessOptions()); | 73 CreateAllowFileAccessOptions()); |
| 74 | 74 |
| 75 // For cross-FileUtil copy/move tests. | 75 // For cross-FileUtil copy/move tests. |
| 76 other_file_util_.reset(new LocalFileUtil()); | 76 other_file_util_.reset(new LocalFileUtil()); |
| 77 other_file_util_helper_.SetUp(file_system_context_, other_file_util_.get()); | 77 other_file_util_helper_.SetUp(file_system_context_, other_file_util_.get()); |
| 78 |
| 79 isolated_context()->AddReference(filesystem_id_); |
| 78 } | 80 } |
| 79 | 81 |
| 80 void TearDown() { | 82 void TearDown() { |
| 81 isolated_context()->RevokeFileSystem(filesystem_id_); | 83 isolated_context()->RemoveReference(filesystem_id_); |
| 82 other_file_util_helper_.TearDown(); | 84 other_file_util_helper_.TearDown(); |
| 83 } | 85 } |
| 84 | 86 |
| 85 protected: | 87 protected: |
| 86 IsolatedContext* isolated_context() const { | 88 IsolatedContext* isolated_context() const { |
| 87 return IsolatedContext::GetInstance(); | 89 return IsolatedContext::GetInstance(); |
| 88 } | 90 } |
| 89 const FilePath& root_path() const { | 91 const FilePath& root_path() const { |
| 90 return data_dir_.path(); | 92 return data_dir_.path(); |
| 91 } | 93 } |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 EXPECT_EQ(base::PLATFORM_FILE_OK, | 506 EXPECT_EQ(base::PLATFORM_FILE_OK, |
| 505 file_util()->Truncate(GetOperationContext().get(), url, 999)); | 507 file_util()->Truncate(GetOperationContext().get(), url, 999)); |
| 506 ASSERT_EQ(base::PLATFORM_FILE_OK, | 508 ASSERT_EQ(base::PLATFORM_FILE_OK, |
| 507 file_util()->GetFileInfo(GetOperationContext().get(), url, | 509 file_util()->GetFileInfo(GetOperationContext().get(), url, |
| 508 &info, &platform_path)); | 510 &info, &platform_path)); |
| 509 EXPECT_EQ(999, info.size); | 511 EXPECT_EQ(999, info.size); |
| 510 } | 512 } |
| 511 } | 513 } |
| 512 | 514 |
| 513 } // namespace fileapi | 515 } // namespace fileapi |
| OLD | NEW |