Index: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc |
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc |
index 2250e53c283b91e8539d9e1440897697e4c28a74..bc88ef998b249da22d475c6288895f7e52441491 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc |
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc |
@@ -2296,6 +2296,12 @@ TEST_F(GDataFileSystemTest, UpdateFileByResourceId_PersistentFile) { |
ASSERT_FALSE(file_util::PathExists(original_cache_file_path)); |
ASSERT_TRUE(file_util::PathExists(dirty_cache_file_path)); |
+ // Modify the cached file. |
+ const std::string kDummyCacheContent("modification to the cache"); |
+ ASSERT_TRUE(file_util::WriteFile(dirty_cache_file_path, |
+ kDummyCacheContent.c_str(), |
+ kDummyCacheContent.size())); |
+ |
// Commit the dirty bit. The cache file name remains the same |
// but a symlink will be created at: |
// GCache/v1/outgoing/<kResourceId> |
@@ -2343,7 +2349,7 @@ TEST_F(GDataFileSystemTest, UpdateFileByResourceId_PersistentFile) { |
GURL("https://file_link_resumable_edit_media/"), |
kFilePath, |
dirty_cache_file_path, |
- 892721, // The size is written in the root_feed.json. |
+ kDummyCacheContent.size(), // The size after modification must be used. |
"audio/mpeg", |
_)) // callback |
.WillOnce(MockUploadExistingFile( |