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

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

Issue 10823285: Reland http://codereview.chromium.org/10831279/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_cache_unittest.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 c9413b99475da0afbf240e0cf047ec868e4ce826..3a5d10a51627b26f94a406752c09b29dade08556 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -1242,6 +1242,9 @@ TEST_F(GDataFileSystemTest, CachedFeadLoadingThenServerFeedLoading) {
}
TEST_F(GDataFileSystemTest, TransferFileFromLocalToRemote_RegularFile) {
+ EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
+ .Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
+
LoadRootFeedDocument("root_feed.json");
// We'll add a file to the Drive root directory.
@@ -2046,6 +2049,7 @@ TEST_F(GDataFileSystemTest, GetFileByPath_FromGData_NoEnoughSpaceButCanFreeUp) {
// but then start reporting we have space. This is to emulate that
// the disk space was freed up by removing temporary files.
EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
+ .WillOnce(Return(file_size + kMinFreeSpace))
.WillOnce(Return(0))
.WillOnce(Return(file_size + kMinFreeSpace))
.WillOnce(Return(file_size + kMinFreeSpace));
@@ -2134,6 +2138,9 @@ TEST_F(GDataFileSystemTest, GetFileByPath_FromGData_EnoughSpaceButBecomeFull) {
}
TEST_F(GDataFileSystemTest, GetFileByPath_FromCache) {
+ EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
+ .Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
+
LoadRootFeedDocument("root_feed.json");
GetFileCallback callback =
@@ -2239,6 +2246,9 @@ TEST_F(GDataFileSystemTest, GetFileByResourceId) {
}
TEST_F(GDataFileSystemTest, GetFileByResourceId_FromCache) {
+ EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
+ .Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
+
LoadRootFeedDocument("root_feed.json");
GetFileCallback callback =
@@ -2275,6 +2285,9 @@ TEST_F(GDataFileSystemTest, GetFileByResourceId_FromCache) {
}
TEST_F(GDataFileSystemTest, UpdateFileByResourceId_PersistentFile) {
+ EXPECT_CALL(*mock_free_disk_space_checker_, AmountOfFreeDiskSpace())
+ .Times(AtLeast(1)).WillRepeatedly(Return(kLotsOfSpace));
+
LoadRootFeedDocument("root_feed.json");
// This is a file defined in root_feed.json.
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_cache_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698