Commit 1df52660 authored by Viktor Semeniuk's avatar Viktor Semeniuk Committed by Commit Bot

[iOS][Password Check] Removed possibility to Cancel Check

This change removes possibility to cancel Password Check.

Bug: 1075494
Change-Id: Ia9602bf8b8660dd61db5e8bb8df2b22726eb9a9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339743
Commit-Queue: Viktor Semeniuk <vsemeniuk@google.com>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797163}
parent 27f3b5e9
......@@ -1020,12 +1020,7 @@ std::vector<std::unique_ptr<autofill::PasswordForm>> CopyOf(
l10n_util::GetNSString(IDS_IOS_CHECK_PASSWORDS_NOW_BUTTON);
break;
case PasswordCheckStateRunning:
_checkForProblemsItem.textColor = [UIColor colorNamed:kBlueColor];
_checkForProblemsItem.accessibilityTraits &=
~UIAccessibilityTraitNotEnabled;
_checkForProblemsItem.text =
l10n_util::GetNSString(IDS_IOS_CANCEL_PASSWORD_CHECK_BUTTON);
break;
// Fall through.
case PasswordCheckStateDisabled:
_checkForProblemsItem.text =
l10n_util::GetNSString(IDS_IOS_CHECK_PASSWORDS_NOW_BUTTON);
......@@ -1340,11 +1335,8 @@ std::vector<std::unique_ptr<autofill::PasswordForm>> CopyOf(
}
break;
case ItemTypeCheckForProblemsButton:
if (_passwordCheck->GetPasswordCheckState() ==
PasswordCheckState::kRunning) {
_passwordCheck->StopPasswordCheck();
} else if (_passwordCheck->GetPasswordCheckState() !=
PasswordCheckState::kNoPasswords) {
if (_passwordCheck->GetPasswordCheckState() !=
PasswordCheckState::kNoPasswords) {
_passwordCheck->StartPasswordCheck();
}
break;
......
......@@ -660,7 +660,7 @@ TEST_P(PasswordsTableViewControllerTest, PasswordCheckStateRunning) {
ChangePasswordCheckState(PasswordCheckStateRunning);
CheckTextCellTextWithId(IDS_IOS_CANCEL_PASSWORD_CHECK_BUTTON,
CheckTextCellTextWithId(IDS_IOS_CHECK_PASSWORDS_NOW_BUTTON,
GetSectionIndex(PasswordCheck), 1);
CheckDetailItemTextWithIds(IDS_IOS_CHECK_PASSWORDS,
IDS_IOS_CHECK_PASSWORDS_DESCRIPTION,
......@@ -730,28 +730,6 @@ TEST_P(PasswordsTableViewControllerTest, StartPasswordCheck) {
PasswordCheck)]];
}
// Test verifies tapping cancel triggers correct function in service.
TEST_P(PasswordsTableViewControllerTest, StopPasswordCheck) {
if (!GetParam().password_check_enabled)
return;
AddSavedForm1();
RunUntilIdle();
PasswordsTableViewController* passwords_controller =
static_cast<PasswordsTableViewController*>(controller());
ON_CALL(GetMockPasswordCheckService(), GetState())
.WillByDefault(Return(
password_manager::BulkLeakCheckServiceInterface::State::kRunning));
EXPECT_CALL(GetMockPasswordCheckService(), Cancel);
[passwords_controller tableView:passwords_controller.tableView
didSelectRowAtIndexPath:[NSIndexPath
indexPathForItem:1
inSection:GetSectionIndex(
PasswordCheck)]];
}
// Test verifies changes to the password store are reflected on UI.
TEST_P(PasswordsTableViewControllerTest, PasswordStoreListener) {
if (!GetParam().password_check_enabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment