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

Unified Diff: chrome/browser/chromeos/drive/file_system_unittest.cc

Issue 252563011: drive: Remove root_feed.json and others (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/drive/file_system_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_system_unittest.cc b/chrome/browser/chromeos/drive/file_system_unittest.cc
index 092fa3fbf9d80f799596a0d451b09e7e011dd707..36556d5dc5b7086d025c4860f24115935165abc3 100644
--- a/chrome/browser/chromeos/drive/file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system_unittest.cc
@@ -854,19 +854,21 @@ TEST_F(FileSystemTest, MarkCacheFileAsMountedAndUnmounted) {
ASSERT_TRUE(LoadFullResourceList());
base::FilePath file_in_root(FILE_PATH_LITERAL("drive/root/File 1.txt"));
- scoped_ptr<ResourceEntry> entry(GetResourceEntrySync(file_in_root));
- ASSERT_TRUE(entry);
-
- // Write to cache.
- ASSERT_EQ(FILE_ERROR_OK, cache_->Store(
- entry->local_id(),
- entry->file_specific_info().md5(),
- google_apis::test_util::GetTestFilePath("gdata/root_feed.json"),
- internal::FileCache::FILE_OPERATION_COPY));
- // Test for mounting.
+ // Make the file cached.
FileError error = FILE_ERROR_FAILED;
base::FilePath file_path;
+ scoped_ptr<ResourceEntry> entry;
+ file_system_->GetFile(
+ file_in_root,
+ google_apis::test_util::CreateCopyResultCallback(
+ &error, &file_path, &entry));
+ test_util::RunBlockingPoolTask();
+ EXPECT_EQ(FILE_ERROR_OK, error);
+
+ // Test for mounting.
+ error = FILE_ERROR_FAILED;
+ file_path.clear();
file_system_->MarkCacheFileAsMounted(
file_in_root,
google_apis::test_util::CreateCopyResultCallback(&error, &file_path));

Powered by Google App Engine
This is Rietveld 408576698