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 "chrome/browser/media_galleries/fileapi/itunes_file_util.h" | 5 #include "chrome/browser/media_galleries/fileapi/itunes_file_util.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 file_system_context_ = new storage::FileSystemContext( | 183 file_system_context_ = new storage::FileSystemContext( |
184 base::ThreadTaskRunnerHandle::Get().get(), | 184 base::ThreadTaskRunnerHandle::Get().get(), |
185 base::ThreadTaskRunnerHandle::Get().get(), | 185 base::ThreadTaskRunnerHandle::Get().get(), |
186 storage::ExternalMountPoints::CreateRefCounted().get(), | 186 storage::ExternalMountPoints::CreateRefCounted().get(), |
187 storage_policy.get(), NULL, std::move(additional_providers), | 187 storage_policy.get(), NULL, std::move(additional_providers), |
188 std::vector<storage::URLRequestAutoMountHandler>(), | 188 std::vector<storage::URLRequestAutoMountHandler>(), |
189 profile_dir_.GetPath(), content::CreateAllowFileAccessOptions()); | 189 profile_dir_.GetPath(), content::CreateAllowFileAccessOptions()); |
190 } | 190 } |
191 | 191 |
| 192 void TearDown() override { |
| 193 MediaFileSystemBackend::MediaTaskRunner()->DeleteSoon( |
| 194 FROM_HERE, itunes_data_provider_.release()); |
| 195 } |
| 196 |
192 protected: | 197 protected: |
193 void TestNonexistentFolder(const std::string& path_append) { | 198 void TestNonexistentFolder(const std::string& path_append) { |
194 FileSystemOperation::FileEntryList contents; | 199 FileSystemOperation::FileEntryList contents; |
195 FileSystemURL url = CreateURL(path_append); | 200 FileSystemURL url = CreateURL(path_append); |
196 bool completed = false; | 201 bool completed = false; |
197 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); | 202 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); |
198 | 203 |
199 ASSERT_FALSE(completed); | 204 ASSERT_FALSE(completed); |
200 } | 205 } |
201 | 206 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 completed = false; | 348 completed = false; |
344 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); | 349 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); |
345 ASSERT_TRUE(completed); | 350 ASSERT_TRUE(completed); |
346 ASSERT_EQ(1u, contents.size()); | 351 ASSERT_EQ(1u, contents.size()); |
347 EXPECT_FALSE(contents.front().is_directory); | 352 EXPECT_FALSE(contents.front().is_directory); |
348 EXPECT_EQ(base::FilePath().AppendASCII("baz.ogg").value(), | 353 EXPECT_EQ(base::FilePath().AppendASCII("baz.ogg").value(), |
349 contents.front().name); | 354 contents.front().name); |
350 } | 355 } |
351 | 356 |
352 } // namespace itunes | 357 } // namespace itunes |
OLD | NEW |