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

Unified Diff: chrome/browser/chromeos/gdata/drive_file_system_unittest.cc

Issue 10876075: AddEntryToDirectory now takes a FilePath and scoped_ptr<DocumentEntry> (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/gdata/drive_file_system_unittest.cc
===================================================================
--- chrome/browser/chromeos/gdata/drive_file_system_unittest.cc (revision 153571)
+++ chrome/browser/chromeos/gdata/drive_file_system_unittest.cc (working copy)
@@ -305,7 +305,6 @@
void AddDirectoryFromFile(const FilePath& directory_path,
const std::string& filename) {
- std::string error;
scoped_ptr<Value> atom(LoadJSONFile(filename));
ASSERT_TRUE(atom.get());
ASSERT_TRUE(atom->GetType() == Value::TYPE_DICTIONARY);
@@ -324,11 +323,15 @@
directory_path.GetComponents(&dir_parts);
entry_dict->SetString("title.$t", dir_parts[dir_parts.size() - 1]);
- ASSERT_EQ(file_system_->AddNewDirectory(directory_path.DirName(),
- entry_value),
- DRIVE_FILE_OK)
- << "Failed adding "
- << directory_path.DirName().value();
+ DriveFileError error;
+ DriveFileSystem::CreateDirectoryParams params(directory_path,
+ directory_path,
+ false, // is_exclusive
+ false, // is_recursive
+ base::Bind(&test_util::CopyErrorCodeFromFileOperationCallback, &error));
+ file_system_->AddNewDirectory(params, HTTP_SUCCESS, atom.Pass());
+ test_util::RunBlockingPoolTask();
+ EXPECT_EQ(DRIVE_FILE_OK, error);
}
// Updates the content of directory under |directory_path| with parsed feed
« no previous file with comments | « chrome/browser/chromeos/gdata/drive_file_system_interface.h ('k') | chrome/browser/chromeos/gdata/drive_resource_metadata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698