| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 continue; | 246 continue; |
| 247 } | 247 } |
| 248 base::FilePath relative = GetRelativeVirtualPath(root2, url2); | 248 base::FilePath relative = GetRelativeVirtualPath(root2, url2); |
| 249 EXPECT_TRUE(file_set1.find(relative) != file_set1.end()); | 249 EXPECT_TRUE(file_set1.find(relative) != file_set1.end()); |
| 250 VerifyFilesHaveSameContent(url1, url2); | 250 VerifyFilesHaveSameContent(url1, url2); |
| 251 } | 251 } |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 | 254 |
| 255 std::unique_ptr<storage::FileSystemOperationContext> GetOperationContext() { | 255 std::unique_ptr<storage::FileSystemOperationContext> GetOperationContext() { |
| 256 return base::WrapUnique( | 256 return base::MakeUnique<storage::FileSystemOperationContext>( |
| 257 new storage::FileSystemOperationContext(file_system_context())); | 257 file_system_context()); |
| 258 } | 258 } |
| 259 | 259 |
| 260 | 260 |
| 261 private: | 261 private: |
| 262 void SimulateDropFiles() { | 262 void SimulateDropFiles() { |
| 263 size_t root_path_index = 0; | 263 size_t root_path_index = 0; |
| 264 | 264 |
| 265 storage::IsolatedContext::FileInfoSet toplevels; | 265 storage::IsolatedContext::FileInfoSet toplevels; |
| 266 for (size_t i = 0; i < kRegularFileSystemTestCaseSize; ++i) { | 266 for (size_t i = 0; i < kRegularFileSystemTestCaseSize; ++i) { |
| 267 const FileSystemTestCaseRecord& test_case = | 267 const FileSystemTestCaseRecord& test_case = |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 EXPECT_EQ(base::File::FILE_OK, | 548 EXPECT_EQ(base::File::FILE_OK, |
| 549 file_util()->Truncate(GetOperationContext().get(), url, 999)); | 549 file_util()->Truncate(GetOperationContext().get(), url, 999)); |
| 550 ASSERT_EQ(base::File::FILE_OK, | 550 ASSERT_EQ(base::File::FILE_OK, |
| 551 file_util()->GetFileInfo(GetOperationContext().get(), url, | 551 file_util()->GetFileInfo(GetOperationContext().get(), url, |
| 552 &info, &platform_path)); | 552 &info, &platform_path)); |
| 553 EXPECT_EQ(999, info.size); | 553 EXPECT_EQ(999, info.size); |
| 554 } | 554 } |
| 555 } | 555 } |
| 556 | 556 |
| 557 } // namespace content | 557 } // namespace content |
| OLD | NEW |