Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc

Issue 2514113003: Revert of Require FilePathWatcher destructor to be called in sequence with Watch(). (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
197 protected: 192 protected:
198 void TestNonexistentFolder(const std::string& path_append) { 193 void TestNonexistentFolder(const std::string& path_append) {
199 FileSystemOperation::FileEntryList contents; 194 FileSystemOperation::FileEntryList contents;
200 FileSystemURL url = CreateURL(path_append); 195 FileSystemURL url = CreateURL(path_append);
201 bool completed = false; 196 bool completed = false;
202 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); 197 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed);
203 198
204 ASSERT_FALSE(completed); 199 ASSERT_FALSE(completed);
205 } 200 }
206 201
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 completed = false; 343 completed = false;
349 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); 344 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed);
350 ASSERT_TRUE(completed); 345 ASSERT_TRUE(completed);
351 ASSERT_EQ(1u, contents.size()); 346 ASSERT_EQ(1u, contents.size());
352 EXPECT_FALSE(contents.front().is_directory); 347 EXPECT_FALSE(contents.front().is_directory);
353 EXPECT_EQ(base::FilePath().AppendASCII("baz.ogg").value(), 348 EXPECT_EQ(base::FilePath().AppendASCII("baz.ogg").value(),
354 contents.front().name); 349 contents.front().name);
355 } 350 }
356 351
357 } // namespace itunes 352 } // namespace itunes
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698