Chromium Code Reviews| Index: chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc |
| diff --git a/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc b/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc |
| index c91de8f769c5648be1e964b7a1157822af756df0..b2a85e8f6907f76ad538552a499bdc8f4f5c26b9 100644 |
| --- a/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc |
| +++ b/chrome/browser/sync_file_system/drive_file_sync_service_mock_unittest.cc |
| @@ -198,6 +198,14 @@ ACTION(InvokeDidApplyRemoteChange) { |
| FROM_HERE, base::Bind(arg3, SYNC_STATUS_OK)); |
| } |
| +ACTION(InvokeGetChangeListWithEmptyChange) { |
| + scoped_ptr<google_apis::ResourceList> resource_list( |
| + new google_apis::ResourceList()); |
| + base::MessageLoopProxy::current()->PostTask( |
| + FROM_HERE, base::Bind(arg1, google_apis::HTTP_SUCCESS, |
| + base::Passed(&resource_list))); |
| +} |
| + |
| } // namespace |
| class MockRemoteServiceObserver : public RemoteFileSyncService::Observer { |
| @@ -587,6 +595,12 @@ class DriveFileSyncServiceMockTest : public testing::Test { |
| .RetiresOnSaturation(); |
| } |
| + void SetUpDriveServiceExpectCallsForEmptyRemoteChange() { |
| + EXPECT_CALL(*mock_drive_service(), |
| + GetChangeList(_, _)) |
| + .WillOnce(InvokeGetChangeListWithEmptyChange()); |
|
tzik
2013/04/16 09:14:10
Could you add .RetiresOnSaturation(); since now we
calvinlo
2013/04/16 09:27:51
Done.
|
| + } |
| + |
| // End of mock setup helpers ----------------------------------------------- |
| private: |
| @@ -705,6 +719,8 @@ TEST_F(DriveFileSyncServiceMockTest, RegisterNewOrigin) { |
| "chromeos/sync_file_system/listing_files_in_empty_directory.json", |
| kDirectoryResourceId); |
| + SetUpDriveServiceExpectCallsForEmptyRemoteChange(); |
| + |
| SetUpDriveSyncService(true); |
| bool done = false; |
| sync_service()->RegisterOriginForTrackingChanges( |