| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |