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

Side by Side Diff: chrome/browser/ui/webui/settings/people_handler_unittest.cc

Issue 1967883002: Settings People Revamp: Fix some small bugs in the handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the failing test Created 4 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/settings/people_handler.h" 5 #include "chrome/browser/ui/webui/settings/people_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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 EXPECT_EQ(1U, web_ui_.call_data().size()); 404 EXPECT_EQ(1U, web_ui_.call_data().size());
405 ExpectPageStatusChanged(PeopleHandler::kSpinnerPageStatus); 405 ExpectPageStatusChanged(PeopleHandler::kSpinnerPageStatus);
406 406
407 Mock::VerifyAndClearExpectations(mock_pss_); 407 Mock::VerifyAndClearExpectations(mock_pss_);
408 // Now, act as if the ProfileSyncService has started up. 408 // Now, act as if the ProfileSyncService has started up.
409 SetDefaultExpectationsForConfigPage(); 409 SetDefaultExpectationsForConfigPage();
410 EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(true)); 410 EXPECT_CALL(*mock_pss_, IsBackendInitialized()).WillRepeatedly(Return(true));
411 error_ = GoogleServiceAuthError::AuthErrorNone(); 411 error_ = GoogleServiceAuthError::AuthErrorNone();
412 EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error_)); 412 EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error_));
413 NotifySyncListeners(); 413 handler_->SyncStartupCompleted();
414 414
415 EXPECT_EQ(2U, web_ui_.call_data().size()); 415 EXPECT_EQ(2U, web_ui_.call_data().size());
416 416
417 const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged(); 417 const base::DictionaryValue* dictionary = ExpectSyncPrefsChanged();
418 CheckBool(dictionary, "syncAllDataTypes", true); 418 CheckBool(dictionary, "syncAllDataTypes", true);
419 CheckBool(dictionary, "encryptAllDataAllowed", true); 419 CheckBool(dictionary, "encryptAllDataAllowed", true);
420 CheckBool(dictionary, "encryptAllData", false); 420 CheckBool(dictionary, "encryptAllData", false);
421 CheckBool(dictionary, "passphraseRequired", false); 421 CheckBool(dictionary, "passphraseRequired", false);
422 } 422 }
423 423
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 SetupInitializedProfileSyncService(); 916 SetupInitializedProfileSyncService();
917 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) 917 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed())
918 .WillRepeatedly(Return(false)); 918 .WillRepeatedly(Return(false));
919 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); 919 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0);
920 handler_->HandleSetEncryption(&list_args); 920 handler_->HandleSetEncryption(&list_args);
921 921
922 ExpectPageStatusResponse(PeopleHandler::kConfigurePageStatus); 922 ExpectPageStatusResponse(PeopleHandler::kConfigurePageStatus);
923 } 923 }
924 924
925 } // namespace settings 925 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/people_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698