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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 EXPECT_CALL(*mock_pss_, IsBackendInitialized()) | 433 EXPECT_CALL(*mock_pss_, IsBackendInitialized()) |
434 .WillOnce(Return(false)) | 434 .WillOnce(Return(false)) |
435 .WillRepeatedly(Return(true)); | 435 .WillRepeatedly(Return(true)); |
436 SetDefaultExpectationsForConfigPage(); | 436 SetDefaultExpectationsForConfigPage(); |
437 handler_->OpenSyncSetup(false /* creating_supervised_user */); | 437 handler_->OpenSyncSetup(false /* creating_supervised_user */); |
438 | 438 |
439 // It's important to tell sync the user cancelled the setup flow before we | 439 // It's important to tell sync the user cancelled the setup flow before we |
440 // tell it we're through with the setup progress. | 440 // tell it we're through with the setup progress. |
441 testing::InSequence seq; | 441 testing::InSequence seq; |
442 EXPECT_CALL(*mock_pss_, RequestStop(ProfileSyncService::CLEAR_DATA)); | 442 EXPECT_CALL(*mock_pss_, RequestStop(ProfileSyncService::CLEAR_DATA)); |
443 EXPECT_CALL(*mock_pss_, SetSetupInProgress(false)); | 443 EXPECT_CALL(*mock_pss_, OnSetupInProgressHandleDestroyed()); |
444 | 444 |
445 handler_->CloseSyncSetup(); | 445 handler_->CloseSyncSetup(); |
446 EXPECT_EQ(NULL, | 446 EXPECT_EQ(NULL, |
447 LoginUIServiceFactory::GetForProfile( | 447 LoginUIServiceFactory::GetForProfile( |
448 profile_)->current_login_ui()); | 448 profile_)->current_login_ui()); |
449 } | 449 } |
450 | 450 |
451 TEST_F(PeopleHandlerTest, | 451 TEST_F(PeopleHandlerTest, |
452 DisplayConfigureWithBackendDisabledAndSigninFailed) { | 452 DisplayConfigureWithBackendDisabledAndSigninFailed) { |
453 EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true)); | 453 EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true)); |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 SetupInitializedProfileSyncService(); | 902 SetupInitializedProfileSyncService(); |
903 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) | 903 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) |
904 .WillRepeatedly(Return(false)); | 904 .WillRepeatedly(Return(false)); |
905 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); | 905 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); |
906 handler_->HandleSetEncryption(&list_args); | 906 handler_->HandleSetEncryption(&list_args); |
907 | 907 |
908 ExpectPageStatusResponse(PeopleHandler::kConfigurePageStatus); | 908 ExpectPageStatusResponse(PeopleHandler::kConfigurePageStatus); |
909 } | 909 } |
910 | 910 |
911 } // namespace settings | 911 } // namespace settings |
OLD | NEW |