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

Unified Diff: chrome/browser/chromeos/drive/file_system_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/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 36556d5dc5b7086d025c4860f24115935165abc3..a0c50063e9df16a01b7d1b0dc1ab13801e98f795 100644
--- a/chrome/browser/chromeos/drive/file_system_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_system_unittest.cc
@@ -789,7 +789,8 @@ TEST_F(FileSystemTest, PinAndUnpin) {
EXPECT_EQ(FILE_ERROR_OK, error);
FileCacheEntry cache_entry;
- EXPECT_TRUE(cache_->GetCacheEntry(entry->local_id(), &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());
@@ -800,7 +801,8 @@ TEST_F(FileSystemTest, PinAndUnpin) {
test_util::RunBlockingPoolTask();
EXPECT_EQ(FILE_ERROR_OK, error);
- EXPECT_TRUE(cache_->GetCacheEntry(entry->local_id(), &cache_entry));
+ EXPECT_EQ(FILE_ERROR_OK,
+ cache_->GetCacheEntry(entry->local_id(), &cache_entry));
EXPECT_FALSE(cache_entry.is_pinned());
// Pinned file gets synced and it results in entry state changes.
@@ -835,7 +837,8 @@ TEST_F(FileSystemTest, PinAndUnpin_NotSynced) {
// No cache file available because the sync was cancelled by Unpin().
FileCacheEntry cache_entry;
- EXPECT_FALSE(cache_->GetCacheEntry(entry->local_id(), &cache_entry));
+ EXPECT_EQ(FILE_ERROR_NOT_FOUND,
+ cache_->GetCacheEntry(entry->local_id(), &cache_entry));
}
TEST_F(FileSystemTest, GetAvailableSpace) {

Powered by Google App Engine
This is Rietveld 408576698