| OLD | NEW |
| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 EXPECT_CALL(*mock_pss_, IsBackendInitialized()) | 434 EXPECT_CALL(*mock_pss_, IsBackendInitialized()) |
| 435 .WillOnce(Return(false)) | 435 .WillOnce(Return(false)) |
| 436 .WillRepeatedly(Return(true)); | 436 .WillRepeatedly(Return(true)); |
| 437 SetDefaultExpectationsForConfigPage(); | 437 SetDefaultExpectationsForConfigPage(); |
| 438 handler_->OpenSyncSetup(false /* creating_supervised_user */); | 438 handler_->OpenSyncSetup(false /* creating_supervised_user */); |
| 439 | 439 |
| 440 // It's important to tell sync the user cancelled the setup flow before we | 440 // It's important to tell sync the user cancelled the setup flow before we |
| 441 // tell it we're through with the setup progress. | 441 // tell it we're through with the setup progress. |
| 442 testing::InSequence seq; | 442 testing::InSequence seq; |
| 443 EXPECT_CALL(*mock_pss_, RequestStop(ProfileSyncService::CLEAR_DATA)); | 443 EXPECT_CALL(*mock_pss_, RequestStop(ProfileSyncService::CLEAR_DATA)); |
| 444 EXPECT_CALL(*mock_pss_, SetSetupInProgress(false)); | 444 EXPECT_CALL(*mock_pss_, OnSetupInProgressHandleDestroyed()); |
| 445 | 445 |
| 446 handler_->CloseSyncSetup(); | 446 handler_->CloseSyncSetup(); |
| 447 EXPECT_EQ(NULL, | 447 EXPECT_EQ(NULL, |
| 448 LoginUIServiceFactory::GetForProfile( | 448 LoginUIServiceFactory::GetForProfile( |
| 449 profile_.get())->current_login_ui()); | 449 profile_.get())->current_login_ui()); |
| 450 } | 450 } |
| 451 | 451 |
| 452 TEST_F(SyncSetupHandlerTest, | 452 TEST_F(SyncSetupHandlerTest, |
| 453 DisplayConfigureWithBackendDisabledAndSigninFailed) { | 453 DisplayConfigureWithBackendDisabledAndSigninFailed) { |
| 454 EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true)); | 454 EXPECT_CALL(*mock_pss_, CanSyncStart()).WillRepeatedly(Return(true)); |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) | 941 EXPECT_CALL(*mock_pss_, IsEncryptEverythingAllowed()) |
| 942 .WillRepeatedly(Return(false)); | 942 .WillRepeatedly(Return(false)); |
| 943 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); | 943 EXPECT_CALL(*mock_pss_, EnableEncryptEverything()).Times(0); |
| 944 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _)); | 944 EXPECT_CALL(*mock_pss_, OnUserChoseDatatypes(true, _)); |
| 945 handler_->HandleConfigure(&list_args); | 945 handler_->HandleConfigure(&list_args); |
| 946 | 946 |
| 947 // Ensure that we navigated to the "done" state since we don't need a | 947 // Ensure that we navigated to the "done" state since we don't need a |
| 948 // passphrase. | 948 // passphrase. |
| 949 ExpectDone(); | 949 ExpectDone(); |
| 950 } | 950 } |
| OLD | NEW |