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

Side by Side Diff: chrome/browser/sync/sync_global_error_unittest.cc

Issue 2533083002: [Sync] SyncEngine refactor part 1: interfaces. (Closed)
Patch Set: Rebase. Created 4 years 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
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 "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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_error_notifier_ash_unittest.cc ('k') | chrome/browser/sync/sync_ui_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698