| OLD | NEW |
| 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/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 SetRemoteChangeProcessor(local_service.get())).Times(1); | 147 SetRemoteChangeProcessor(local_service.get())).Times(1); |
| 148 | 148 |
| 149 sync_service_->Initialize( | 149 sync_service_->Initialize( |
| 150 local_service.Pass(), | 150 local_service.Pass(), |
| 151 scoped_ptr<RemoteFileSyncService>(remote_service_)); | 151 scoped_ptr<RemoteFileSyncService>(remote_service_)); |
| 152 | 152 |
| 153 // Disable auto sync by default. | 153 // Disable auto sync by default. |
| 154 EXPECT_CALL(*mock_remote_service(), SetSyncEnabled(false)).Times(1); | 154 EXPECT_CALL(*mock_remote_service(), SetSyncEnabled(false)).Times(1); |
| 155 sync_service_->SetSyncEnabledForTesting(false); | 155 sync_service_->SetSyncEnabledForTesting(false); |
| 156 | 156 |
| 157 file_system_->SetUp(); | 157 file_system_->SetUp(CannedSyncableFileSystem::QUOTA_ENABLED); |
| 158 } | 158 } |
| 159 | 159 |
| 160 virtual void TearDown() OVERRIDE { | 160 virtual void TearDown() OVERRIDE { |
| 161 sync_service_->Shutdown(); | 161 sync_service_->Shutdown(); |
| 162 file_system_->TearDown(); | 162 file_system_->TearDown(); |
| 163 RevokeSyncableFileSystem(); | 163 RevokeSyncableFileSystem(); |
| 164 content::RunAllPendingInMessageLoop(BrowserThread::FILE); | 164 content::RunAllPendingInMessageLoop(BrowserThread::FILE); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void InitializeApp() { | 167 void InitializeApp() { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 base::Bind(&AssignValueAndQuit<SyncFileStatus>, | 511 base::Bind(&AssignValueAndQuit<SyncFileStatus>, |
| 512 &run_loop, &status, &sync_file_status)); | 512 &run_loop, &status, &sync_file_status)); |
| 513 run_loop.Run(); | 513 run_loop.Run(); |
| 514 | 514 |
| 515 EXPECT_EQ(SYNC_STATUS_OK, status); | 515 EXPECT_EQ(SYNC_STATUS_OK, status); |
| 516 EXPECT_EQ(SYNC_FILE_STATUS_CONFLICTING, sync_file_status); | 516 EXPECT_EQ(SYNC_FILE_STATUS_CONFLICTING, sync_file_status); |
| 517 } | 517 } |
| 518 } | 518 } |
| 519 | 519 |
| 520 } // namespace sync_file_system | 520 } // namespace sync_file_system |
| OLD | NEW |