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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/test/scoped_task_environment.h" | 13 #include "base/test/scoped_task_environment.h" |
14 #include "content/public/test/test_file_system_context.h" | |
15 #include "storage/browser/blob/scoped_file.h" | 14 #include "storage/browser/blob/scoped_file.h" |
16 #include "storage/browser/fileapi/file_system_context.h" | 15 #include "storage/browser/fileapi/file_system_context.h" |
17 #include "storage/browser/fileapi/file_system_operation_context.h" | 16 #include "storage/browser/fileapi/file_system_operation_context.h" |
18 #include "storage/browser/fileapi/isolated_context.h" | 17 #include "storage/browser/fileapi/isolated_context.h" |
19 #include "storage/browser/fileapi/transient_file_util.h" | 18 #include "storage/browser/fileapi/transient_file_util.h" |
| 19 #include "storage/browser/test/test_file_system_context.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
22 using storage::FileSystemURL; | 22 using storage::FileSystemURL; |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 class TransientFileUtilTest : public testing::Test { | 26 class TransientFileUtilTest : public testing::Test { |
27 public: | 27 public: |
28 TransientFileUtilTest() {} | 28 TransientFileUtilTest() {} |
29 ~TransientFileUtilTest() override {} | 29 ~TransientFileUtilTest() override {} |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 base::RunLoop().RunUntilIdle(); | 114 base::RunLoop().RunUntilIdle(); |
115 | 115 |
116 // Now the temporary file and the transient filesystem must be gone too. | 116 // Now the temporary file and the transient filesystem must be gone too. |
117 ASSERT_FALSE(base::PathExists(temp_path)); | 117 ASSERT_FALSE(base::PathExists(temp_path)); |
118 ASSERT_EQ(base::File::FILE_ERROR_NOT_FOUND, | 118 ASSERT_EQ(base::File::FILE_ERROR_NOT_FOUND, |
119 file_util()->GetFileInfo(NewOperationContext().get(), | 119 file_util()->GetFileInfo(NewOperationContext().get(), |
120 temp_url, &file_info, &path)); | 120 temp_url, &file_info, &path)); |
121 } | 121 } |
122 | 122 |
123 } // namespace content | 123 } // namespace content |
OLD | NEW |