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

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

Issue 16628003: drive: Remove FileCacheObserver::OnCacheCommitted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PinAndUnpin Created 7 years, 6 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/drive/sync_client.cc ('k') | chrome/browser/chromeos/drive/test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/sync_client_unittest.cc
diff --git a/chrome/browser/chromeos/drive/sync_client_unittest.cc b/chrome/browser/chromeos/drive/sync_client_unittest.cc
index 0797cf75d3ee55389139024c19b080622942c9c3..1c5b88cae37097eeba4f738e5d28d901103bcdd8 100644
--- a/chrome/browser/chromeos/drive/sync_client_unittest.cc
+++ b/chrome/browser/chromeos/drive/sync_client_unittest.cc
@@ -64,8 +64,11 @@ class SyncClientTestDriveService : public google_apis::FakeDriveService {
};
class DummyOperationObserver : public file_system::OperationObserver {
+ // OperationObserver override:
virtual void OnDirectoryChangedByOperation(
const base::FilePath& path) OVERRIDE {}
+ virtual void OnCacheFileUploadNeededByOperation(
+ const std::string& resource_id) OVERRIDE {}
};
} // namespace
@@ -252,12 +255,9 @@ TEST_F(SyncClientTest, OnCachePinnedAndCancelled) {
}
TEST_F(SyncClientTest, OnCacheUnpinned) {
- sync_client_->AddResourceIdForTesting(SyncClient::FETCH,
- resource_ids_["foo"]);
- sync_client_->AddResourceIdForTesting(SyncClient::FETCH,
- resource_ids_["bar"]);
- sync_client_->AddResourceIdForTesting(SyncClient::FETCH,
- resource_ids_["baz"]);
+ sync_client_->AddFetchTask(resource_ids_["foo"]);
+ sync_client_->AddFetchTask(resource_ids_["bar"]);
+ sync_client_->AddFetchTask(resource_ids_["baz"]);
ASSERT_EQ(3U,
sync_client_->GetResourceIdsForTesting(SyncClient::FETCH).size());
@@ -282,8 +282,7 @@ TEST_F(SyncClientTest, OnCacheUnpinned) {
}
TEST_F(SyncClientTest, Deduplication) {
- sync_client_->AddResourceIdForTesting(SyncClient::FETCH,
- resource_ids_["foo"]);
+ sync_client_->AddFetchTask(resource_ids_["foo"]);
// Set the delay so that DoSyncLoop() is delayed.
sync_client_->set_delay_for_testing(TestTimeouts::action_max_timeout());
« no previous file with comments | « chrome/browser/chromeos/drive/sync_client.cc ('k') | chrome/browser/chromeos/drive/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698