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

Side by Side Diff: chrome/browser/ui/webui/options/sync_setup_handler_unittest.cc

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Chromeos fix Created 3 years, 10 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
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/ui/webui/options/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/options/sync_setup_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 EXPECT_EQ(NULL, 271 EXPECT_EQ(NULL,
272 LoginUIServiceFactory::GetForProfile( 272 LoginUIServiceFactory::GetForProfile(
273 profile_.get())->current_login_ui()); 273 profile_.get())->current_login_ui());
274 } 274 }
275 275
276 // It's difficult to notify sync listeners when using a ProfileSyncServiceMock 276 // It's difficult to notify sync listeners when using a ProfileSyncServiceMock
277 // so this helper routine dispatches an OnStateChanged() notification to the 277 // so this helper routine dispatches an OnStateChanged() notification to the
278 // SyncStartupTracker. 278 // SyncStartupTracker.
279 void NotifySyncListeners() { 279 void NotifySyncListeners() {
280 if (handler_->sync_startup_tracker_) 280 if (handler_->sync_startup_tracker_)
281 handler_->sync_startup_tracker_->OnStateChanged(); 281 handler_->sync_startup_tracker_->OnStateChanged(mock_pss_);
282 } 282 }
283 283
284 virtual std::string GetTestUser() { 284 virtual std::string GetTestUser() {
285 return std::string(kTestUser); 285 return std::string(kTestUser);
286 } 286 }
287 287
288 content::TestBrowserThreadBundle thread_bundle_; 288 content::TestBrowserThreadBundle thread_bundle_;
289 std::unique_ptr<Profile> profile_; 289 std::unique_ptr<Profile> profile_;
290 ProfileSyncServiceMock* mock_pss_; 290 ProfileSyncServiceMock* mock_pss_;
291 GoogleServiceAuthError error_; 291 GoogleServiceAuthError error_;
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) 942 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed())
943 .WillRepeatedly(Return(false)); 943 .WillRepeatedly(Return(false));
944 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); 944 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0);
945 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _)); 945 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _));
946 handler_->HandleConfigure(&list_args); 946 handler_->HandleConfigure(&list_args);
947 947
948 // Ensure that we navigated to the "done" state since we don't need a 948 // Ensure that we navigated to the "done" state since we don't need a
949 // passphrase. 949 // passphrase.
950 ExpectDone(); 950 ExpectDone();
951 } 951 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.cc ('k') | chrome/browser/ui/webui/settings/people_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698