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

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

Issue 100573002: Move directory creation functions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 ASSERT_EQ(1u, contents.size()); 297 ASSERT_EQ(1u, contents.size());
298 EXPECT_FALSE(contents.front().is_directory); 298 EXPECT_FALSE(contents.front().is_directory);
299 EXPECT_EQ(base::FilePath().AppendASCII("baz.ogg").value(), 299 EXPECT_EQ(base::FilePath().AppendASCII("baz.ogg").value(),
300 contents.front().name); 300 contents.front().name);
301 } 301 }
302 302
303 TEST_F(ItunesFileUtilTest, ItunesAutoAddDirEnumerateNested) { 303 TEST_F(ItunesFileUtilTest, ItunesAutoAddDirEnumerateNested) {
304 data_provider()->SetProvideAutoAddDir(true); 304 data_provider()->SetProvideAutoAddDir(true);
305 base::FilePath nested_dir = 305 base::FilePath nested_dir =
306 data_provider()->auto_add_path().AppendASCII("foo").AppendASCII("bar"); 306 data_provider()->auto_add_path().AppendASCII("foo").AppendASCII("bar");
307 ASSERT_TRUE(file_util::CreateDirectory(nested_dir)); 307 ASSERT_TRUE(base::CreateDirectory(nested_dir));
308 ASSERT_EQ(0, 308 ASSERT_EQ(0,
309 file_util::WriteFile(nested_dir.AppendASCII("baz.ogg"), NULL, 0)); 309 file_util::WriteFile(nested_dir.AppendASCII("baz.ogg"), NULL, 0));
310 310
311 FileSystemOperation::FileEntryList contents; 311 FileSystemOperation::FileEntryList contents;
312 FileSystemURL url = CreateURL( 312 FileSystemURL url = CreateURL(
313 std::string(kITunesMediaDir) + "/" + kITunesAutoAddDir); 313 std::string(kITunesMediaDir) + "/" + kITunesAutoAddDir);
314 bool completed = false; 314 bool completed = false;
315 315
316 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); 316 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed);
317 ASSERT_TRUE(completed); 317 ASSERT_TRUE(completed);
(...skipping 17 matching lines...) Expand all
335 completed = false; 335 completed = false;
336 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); 336 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed);
337 ASSERT_TRUE(completed); 337 ASSERT_TRUE(completed);
338 ASSERT_EQ(1u, contents.size()); 338 ASSERT_EQ(1u, contents.size());
339 EXPECT_FALSE(contents.front().is_directory); 339 EXPECT_FALSE(contents.front().is_directory);
340 EXPECT_EQ(base::FilePath().AppendASCII("baz.ogg").value(), 340 EXPECT_EQ(base::FilePath().AppendASCII("baz.ogg").value(),
341 contents.front().name); 341 contents.front().name);
342 } 342 }
343 343
344 } // namespace itunes 344 } // namespace itunes
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698