| 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 "chrome/browser/sync/sync_global_error.h" | 5 #include "chrome/browser/sync/sync_global_error.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 LoginUIServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 136 LoginUIServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 137 profile(), BuildMockLoginUIService)); | 137 profile(), BuildMockLoginUIService)); |
| 138 FakeLoginUI login_ui; | 138 FakeLoginUI login_ui; |
| 139 login_ui_service->SetLoginUI(&login_ui); | 139 login_ui_service->SetLoginUI(&login_ui); |
| 140 | 140 |
| 141 syncer::SyncErrorController error(&service); | 141 syncer::SyncErrorController error(&service); |
| 142 SyncGlobalError global_error( | 142 SyncGlobalError global_error( |
| 143 GlobalErrorServiceFactory::GetForProfile(profile()), login_ui_service, | 143 GlobalErrorServiceFactory::GetForProfile(profile()), login_ui_service, |
| 144 &error, &service); | 144 &error, &service); |
| 145 | 145 |
| 146 syncer::SyncBackendHost::Status status; | 146 syncer::SyncEngine::Status status; |
| 147 EXPECT_CALL(service, QueryDetailedSyncStatus(_)) | 147 EXPECT_CALL(service, QueryDetailedSyncStatus(_)) |
| 148 .WillRepeatedly(Return(false)); | 148 .WillRepeatedly(Return(false)); |
| 149 | 149 |
| 150 EXPECT_CALL(service, IsPassphraseRequired()) | 150 EXPECT_CALL(service, IsPassphraseRequired()) |
| 151 .WillRepeatedly(Return(true)); | 151 .WillRepeatedly(Return(true)); |
| 152 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) | 152 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) |
| 153 .WillRepeatedly(Return(true)); | 153 .WillRepeatedly(Return(true)); |
| 154 VerifySyncGlobalErrorResult( | 154 VerifySyncGlobalErrorResult( |
| 155 &service, login_ui_service, browser(), &error, &global_error, | 155 &service, login_ui_service, browser(), &error, &global_error, |
| 156 GoogleServiceAuthError::NONE, true /* signed in*/, true /* error */); | 156 GoogleServiceAuthError::NONE, true /* signed in*/, true /* error */); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 169 .WillRepeatedly(Return(true)); | 169 .WillRepeatedly(Return(true)); |
| 170 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) | 170 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) |
| 171 .WillRepeatedly(Return(true)); | 171 .WillRepeatedly(Return(true)); |
| 172 VerifySyncGlobalErrorResult( | 172 VerifySyncGlobalErrorResult( |
| 173 &service, login_ui_service, browser(), &error, &global_error, | 173 &service, login_ui_service, browser(), &error, &global_error, |
| 174 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, | 174 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, |
| 175 false /* not signed in */, false /* no error */); | 175 false /* not signed in */, false /* no error */); |
| 176 | 176 |
| 177 global_error.Shutdown(); | 177 global_error.Shutdown(); |
| 178 } | 178 } |
| OLD | NEW |