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

Side by Side Diff: chrome/browser/sync_file_system/sync_file_system_service_unittest.cc

Issue 524193004: [SyncFS] Deflake SyncFileSystemServiceTest.SimpleLocalSyncFlow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); 346 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
347 } 347 }
348 348
349 // The local_change_processor's ApplyLocalChange should be called once 349 // The local_change_processor's ApplyLocalChange should be called once
350 // with ADD_OR_UPDATE change for TYPE_FILE. 350 // with ADD_OR_UPDATE change for TYPE_FILE.
351 const FileChange change(FileChange::FILE_CHANGE_ADD_OR_UPDATE, 351 const FileChange change(FileChange::FILE_CHANGE_ADD_OR_UPDATE,
352 SYNC_FILE_TYPE_FILE); 352 SYNC_FILE_TYPE_FILE);
353 EXPECT_CALL(*mock_local_change_processor(), 353 EXPECT_CALL(*mock_local_change_processor(),
354 ApplyLocalChange(change, _, _, kFile, _)) 354 ApplyLocalChange(change, _, _, kFile, _))
355 .WillOnce(MockStatusCallback(SYNC_STATUS_OK)); 355 .WillOnce(MockStatusCallback(SYNC_STATUS_OK));
356 EXPECT_CALL(*mock_remote_service(), ProcessRemoteChange(_))
357 .WillRepeatedly(MockSyncFileCallback(SYNC_STATUS_NO_CHANGE_TO_SYNC,
358 FileSystemURL()));
356 359
357 EXPECT_CALL(*mock_remote_service(), PromoteDemotedChanges(_)) 360 EXPECT_CALL(*mock_remote_service(), PromoteDemotedChanges(_))
358 .WillRepeatedly(InvokeCompletionClosure()); 361 .WillRepeatedly(InvokeCompletionClosure());
359 362
360 EXPECT_EQ(base::File::FILE_OK, file_system_->CreateFile(kFile)); 363 EXPECT_EQ(base::File::FILE_OK, file_system_->CreateFile(kFile));
361 364
362 run_loop.Run(); 365 run_loop.Run();
363 366
364 file_system_->RemoveSyncStatusObserver(&status_observer); 367 file_system_->RemoveSyncStatusObserver(&status_observer);
365 } 368 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 base::Bind(&AssignValueAndQuit<SyncFileStatus>, 480 base::Bind(&AssignValueAndQuit<SyncFileStatus>,
478 &run_loop, &status, &sync_file_status)); 481 &run_loop, &status, &sync_file_status));
479 run_loop.Run(); 482 run_loop.Run();
480 483
481 EXPECT_EQ(SYNC_STATUS_OK, status); 484 EXPECT_EQ(SYNC_STATUS_OK, status);
482 EXPECT_EQ(SYNC_FILE_STATUS_HAS_PENDING_CHANGES, sync_file_status); 485 EXPECT_EQ(SYNC_FILE_STATUS_HAS_PENDING_CHANGES, sync_file_status);
483 } 486 }
484 } 487 }
485 488
486 } // namespace sync_file_system 489 } // namespace sync_file_system
OLDNEW
« 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