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

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

Issue 286203007: [SyncFS] Drop manual conflict resolution policy support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: drop more unused Created 6 years, 7 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
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 98eda6cd867b6ed0884416d9c5cef207640ce3b9..dc824a336de45270c9be1a3f43c6002e716ed25f 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
@@ -439,12 +439,9 @@ TEST_F(SyncFileSystemServiceTest, MAYBE_GetFileSyncStatus) {
SyncStatusCode status;
SyncFileStatus sync_file_status;
- // 1. The file is not in conflicting nor in pending change state.
+ // 1. The file is synced state.
{
base::RunLoop run_loop;
- EXPECT_CALL(*mock_remote_service(), IsConflicting(kFile))
- .WillOnce(Return(false));
-
status = SYNC_STATUS_UNKNOWN;
sync_file_status = SYNC_FILE_STATUS_UNKNOWN;
sync_service_->GetFileSyncStatus(
@@ -457,32 +454,11 @@ TEST_F(SyncFileSystemServiceTest, MAYBE_GetFileSyncStatus) {
EXPECT_EQ(SYNC_FILE_STATUS_SYNCED, sync_file_status);
}
- // 2. Conflicting case.
+ // 2. The file has pending local changes.
{
base::RunLoop run_loop;
- EXPECT_CALL(*mock_remote_service(), IsConflicting(kFile))
- .WillOnce(Return(true));
-
- status = SYNC_STATUS_UNKNOWN;
- sync_file_status = SYNC_FILE_STATUS_UNKNOWN;
- sync_service_->GetFileSyncStatus(
- kFile,
- base::Bind(&AssignValueAndQuit<SyncFileStatus>,
- &run_loop, &status, &sync_file_status));
- run_loop.Run();
-
- EXPECT_EQ(SYNC_STATUS_OK, status);
- EXPECT_EQ(SYNC_FILE_STATUS_CONFLICTING, sync_file_status);
- }
-
- // 3. The file has pending local changes.
- {
EXPECT_EQ(base::File::FILE_OK, file_system_->CreateFile(kFile));
- base::RunLoop run_loop;
- EXPECT_CALL(*mock_remote_service(), IsConflicting(kFile))
- .WillOnce(Return(false));
-
status = SYNC_STATUS_UNKNOWN;
sync_file_status = SYNC_FILE_STATUS_UNKNOWN;
sync_service_->GetFileSyncStatus(
@@ -494,27 +470,6 @@ TEST_F(SyncFileSystemServiceTest, MAYBE_GetFileSyncStatus) {
EXPECT_EQ(SYNC_STATUS_OK, status);
EXPECT_EQ(SYNC_FILE_STATUS_HAS_PENDING_CHANGES, sync_file_status);
}
-
- // 4. The file has a conflict and pending local changes. In this case
- // we return SYNC_FILE_STATUS_CONFLICTING.
- {
- EXPECT_EQ(base::File::FILE_OK, file_system_->TruncateFile(kFile, 1U));
-
- base::RunLoop run_loop;
- EXPECT_CALL(*mock_remote_service(), IsConflicting(kFile))
- .WillOnce(Return(true));
-
- status = SYNC_STATUS_UNKNOWN;
- sync_file_status = SYNC_FILE_STATUS_UNKNOWN;
- sync_service_->GetFileSyncStatus(
- kFile,
- base::Bind(&AssignValueAndQuit<SyncFileStatus>,
- &run_loop, &status, &sync_file_status));
- run_loop.Run();
-
- EXPECT_EQ(SYNC_STATUS_OK, status);
- EXPECT_EQ(SYNC_FILE_STATUS_CONFLICTING, sync_file_status);
- }
}
} // namespace sync_file_system

Powered by Google App Engine
This is Rietveld 408576698