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

Unified Diff: chrome/browser/sync_file_system/sync_file_system_service_unittest.cc

Issue 453673003: [SyncFS] Promote demoted changes in default remote side backend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test expectation Created 6 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/sync_file_system/sync_file_system_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
diff --git a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
index 8788a0a4084677bc055aafc9bb4f1ac34fb11449..bf29b65bb0331d6b72c30a95437d4ea2f3960b5e 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service_unittest.cc
@@ -119,6 +119,11 @@ ACTION_P2(MockSyncFileCallback, status, url) {
FROM_HERE, base::Bind(arg0, status, url));
}
+ACTION(InvokeCompletionClosure) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(arg0));
+}
+
class SyncFileSystemServiceTest : public testing::Test {
protected:
SyncFileSystemServiceTest()
@@ -349,6 +354,9 @@ TEST_F(SyncFileSystemServiceTest, SimpleLocalSyncFlow) {
ApplyLocalChange(change, _, _, kFile, _))
.WillOnce(MockStatusCallback(SYNC_STATUS_OK));
+ EXPECT_CALL(*mock_remote_service(), PromoteDemotedChanges(_))
+ .WillRepeatedly(InvokeCompletionClosure());
+
EXPECT_EQ(base::File::FILE_OK, file_system_->CreateFile(kFile));
run_loop.Run();
@@ -398,6 +406,9 @@ TEST_F(SyncFileSystemServiceTest, SimpleSyncFlowWithFileBusy) {
.WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
}
+ EXPECT_CALL(*mock_remote_service(), PromoteDemotedChanges(_))
+ .WillRepeatedly(InvokeCompletionClosure());
+
// We might also see an activity for local sync as we're going to make
// a local write operation on kFile.
EXPECT_CALL(*mock_local_change_processor(),
« no previous file with comments | « chrome/browser/sync_file_system/sync_file_system_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698