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

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: hashimoto feedback 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 153316)
+++ 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,13 @@
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, false,
satorux1 2012/08/27 22:45:57 align parameters vertically? please also add comme
achuithb 2012/08/27 23:10:03 Done.
+ 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

Powered by Google App Engine
This is Rietveld 408576698