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

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

Issue 11368002: Use DriveFileSystem::Reload() instead of reloading root feed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
diff --git a/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc b/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
index a6d486a5d4cbc88e4bc02544cf033a06c5b97f3d..14503000befcbda9dac0d0bfffd4c8b48c55f74f 100644
--- a/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
+++ b/chrome/browser/chromeos/drive/stale_cache_files_remover_unittest.cc
@@ -132,14 +132,6 @@ class StaleCacheFilesRemoverTest : public testing::Test {
profile_.reset(NULL);
}
- // Loads test json file as root ("/drive") element.
- void LoadRootFeedDocument(const std::string& filename) {
- test_util::LoadChangeFeed(filename,
- file_system_,
- 0,
- root_feed_changestamp_++);
- }
-
MessageLoopForUI message_loop_;
// The order of the test threads is important, do not change the order.
// See also content/browser/browser_thread_impl.cc.
@@ -183,9 +175,9 @@ TEST_F(StaleCacheFilesRemoverTest, RemoveStaleCacheFiles) {
EXPECT_TRUE(file_util::PathExists(path));
// Verify that the corresponding file entry doesn't exist.
- EXPECT_CALL(*mock_drive_service_, GetAccountMetadata(_)).Times(1);
+ EXPECT_CALL(*mock_drive_service_, GetAccountMetadata(_)).Times(2);
EXPECT_CALL(*mock_drive_service_, GetDocuments(Eq(GURL()), _, "", _, _))
- .Times(1);
+ .Times(2);
EXPECT_CALL(*mock_webapps_registry_, UpdateFromFeed(_)).Times(1);
DriveFileError error(DRIVE_FILE_OK);
@@ -209,8 +201,8 @@ TEST_F(StaleCacheFilesRemoverTest, RemoveStaleCacheFiles) {
EXPECT_EQ(DRIVE_FILE_ERROR_NOT_FOUND, error);
EXPECT_FALSE(entry_proto.get());
- // Load a root feed.
- LoadRootFeedDocument("gdata/root_feed.json");
+ // Load a root feed again to kick the StaleCacheFilesRemover.
+ file_system_->Reload();
// Wait for StaleCacheFilesRemover to finish cleaning up the stale file.
google_apis::test_util::RunBlockingPoolTask();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698