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

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

Issue 146833015: drive: FileCache::Store marks the entry as dirty if empty MD5 is given (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_cache_unittest.cc
diff --git a/chrome/browser/chromeos/drive/file_cache_unittest.cc b/chrome/browser/chromeos/drive/file_cache_unittest.cc
index 7cfa157cdb55d6b131f20dc7816d8e3b68ceadeb..56967ef0a7366056a1a4749d41955a04fe135013 100644
--- a/chrome/browser/chromeos/drive/file_cache_unittest.cc
+++ b/chrome/browser/chromeos/drive/file_cache_unittest.cc
@@ -351,6 +351,10 @@ TEST_F(FileCacheTestOnUIThread, StoreToCacheSimple) {
// Verify that there's only one file with name <id>, i.e. previously
// cached file with the different md5 should be deleted.
EXPECT_EQ(1U, CountCacheFiles(id, md5));
+
+ // Passing empty MD5 marks the entry as dirty.
+ TestStoreToCache(id, std::string(), dummy_file_path_, FILE_ERROR_OK,
+ TEST_CACHE_STATE_PRESENT | TEST_CACHE_STATE_DIRTY);
}
TEST_F(FileCacheTestOnUIThread, RemoveFromCacheSimple) {
« no previous file with comments | « chrome/browser/chromeos/drive/file_cache.cc ('k') | chrome/browser/chromeos/drive/file_system/copy_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698