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

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

Issue 285323002: drive: Remove FileCache::GetCacheEntry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 c202beb7e203fc8d9f169fc532ae66905386fd14..84b724de2fe95322cd00f8fc4b84df1a3a2dd198 100644
--- a/chrome/browser/chromeos/drive/file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system_unittest.cc
@@ -797,11 +797,10 @@ TEST_F(FileSystemTest, PinAndUnpin) {
test_util::RunBlockingPoolTask();
EXPECT_EQ(FILE_ERROR_OK, error);
- FileCacheEntry cache_entry;
- EXPECT_EQ(FILE_ERROR_OK,
- cache_->GetCacheEntry(entry->local_id(), &cache_entry));
- EXPECT_TRUE(cache_entry.is_pinned());
- EXPECT_TRUE(cache_entry.is_present());
+ entry = GetResourceEntrySync(file_path);
+ ASSERT_TRUE(entry);
+ EXPECT_TRUE(entry->file_specific_info().cache_state().is_pinned());
+ EXPECT_TRUE(entry->file_specific_info().cache_state().is_present());
// Unpin the file.
error = FILE_ERROR_FAILED;
@@ -810,9 +809,9 @@ TEST_F(FileSystemTest, PinAndUnpin) {
test_util::RunBlockingPoolTask();
EXPECT_EQ(FILE_ERROR_OK, error);
- EXPECT_EQ(FILE_ERROR_OK,
- cache_->GetCacheEntry(entry->local_id(), &cache_entry));
- EXPECT_FALSE(cache_entry.is_pinned());
+ entry = GetResourceEntrySync(file_path);
+ ASSERT_TRUE(entry);
+ EXPECT_FALSE(entry->file_specific_info().cache_state().is_pinned());
// Pinned file gets synced and it results in entry state changes.
ASSERT_EQ(1u, mock_directory_observer_->changed_directories().size());
@@ -845,9 +844,9 @@ TEST_F(FileSystemTest, PinAndUnpin_NotSynced) {
EXPECT_EQ(FILE_ERROR_OK, error_unpin);
// No cache file available because the sync was cancelled by Unpin().
- FileCacheEntry cache_entry;
- EXPECT_EQ(FILE_ERROR_NOT_FOUND,
- cache_->GetCacheEntry(entry->local_id(), &cache_entry));
+ entry = GetResourceEntrySync(file_path);
+ ASSERT_TRUE(entry);
+ EXPECT_FALSE(entry->file_specific_info().cache_state().is_present());
}
TEST_F(FileSystemTest, GetAvailableSpace) {

Powered by Google App Engine
This is Rietveld 408576698