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

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

Issue 276313002: drive: Change FileCache::GetCacheEntry's return type to FileError (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/remove_stale_cache_files_unittest.cc
diff --git a/chrome/browser/chromeos/drive/remove_stale_cache_files_unittest.cc b/chrome/browser/chromeos/drive/remove_stale_cache_files_unittest.cc
index 417428f509d7413bd3104362fd8740d2dd7980c4..5a8be82096869fe91f9ce9ecac8d073c2393751f 100644
--- a/chrome/browser/chromeos/drive/remove_stale_cache_files_unittest.cc
+++ b/chrome/browser/chromeos/drive/remove_stale_cache_files_unittest.cc
@@ -69,7 +69,7 @@ TEST_F(RemoveStaleCacheFilesTest, RemoveStaleCacheFiles) {
// Verify that the cache entry exists.
FileCacheEntry cache_entry;
- EXPECT_TRUE(cache_->GetCacheEntry(local_id, &cache_entry));
+ EXPECT_EQ(FILE_ERROR_OK, cache_->GetCacheEntry(local_id, &cache_entry));
ResourceEntry entry;
EXPECT_EQ(FILE_ERROR_NOT_FOUND,
@@ -79,7 +79,8 @@ TEST_F(RemoveStaleCacheFilesTest, RemoveStaleCacheFiles) {
RemoveStaleCacheFiles(cache_.get(), resource_metadata_.get());
// Verify that the cache entry is deleted.
- EXPECT_FALSE(cache_->GetCacheEntry(local_id, &cache_entry));
+ EXPECT_EQ(FILE_ERROR_NOT_FOUND,
+ cache_->GetCacheEntry(local_id, &cache_entry));
}
TEST_F(RemoveStaleCacheFilesTest, DirtyCacheFiles) {
@@ -114,8 +115,9 @@ TEST_F(RemoveStaleCacheFilesTest, DirtyCacheFiles) {
// Dirty cache should be removed if and only if the entry does not exist in
// resource_metadata.
FileCacheEntry cache_entry;
- EXPECT_FALSE(cache_->GetCacheEntry(local_id_1, &cache_entry));
- EXPECT_TRUE(cache_->GetCacheEntry(local_id_2, &cache_entry));
+ EXPECT_EQ(FILE_ERROR_NOT_FOUND,
+ cache_->GetCacheEntry(local_id_1, &cache_entry));
+ EXPECT_EQ(FILE_ERROR_OK, cache_->GetCacheEntry(local_id_2, &cache_entry));
}
} // namespace internal
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_unittest.cc ('k') | chrome/browser/chromeos/drive/sync/entry_update_performer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698