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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc

Issue 10832002: gdata: Upload locally modified file in the correct size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove an unused function. Created 8 years, 5 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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698