| Index: chrome/browser/ui/webui/sync_setup_handler_unittest.cc
|
| diff --git a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
|
| index 49f0b8297005a83bae85cff361bbdc61e6c66dcf..625680993935a493e8ba276aeff433c75ba9bfe2 100644
|
| --- a/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
|
| +++ b/chrome/browser/ui/webui/sync_setup_handler_unittest.cc
|
| @@ -442,6 +442,19 @@ TEST_F(SyncSetupHandlerTest, ShowSyncSetupWhenNotSignedIn) {
|
| }
|
| #endif // !defined(OS_CHROMEOS)
|
|
|
| +// Verifies that the sync setup is terminated correctly when the
|
| +// sync is disabled.
|
| +TEST_F(SyncSetupHandlerTest, HandleSetupUIWhenSyncDisabled) {
|
| + EXPECT_CALL(*mock_pss_, IsManaged()).WillRepeatedly(Return(true));
|
| + handler_->HandleShowSetupUI(NULL);
|
| +
|
| + // Sync setup is closed when sync is disabled.
|
| + EXPECT_EQ(NULL,
|
| + LoginUIServiceFactory::GetForProfile(
|
| + profile_.get())->current_login_ui());
|
| + ASSERT_FALSE(handler_->is_configuring_sync());
|
| +}
|
| +
|
| // Verifies that the handler correctly handles a cancellation when
|
| // it is displaying the spinner to the user.
|
| TEST_F(SyncSetupHandlerTest, DisplayConfigureWithBackendDisabledAndCancel) {
|
|
|