Commit a182818d authored by Jan Wilken Dörrie's avatar Jan Wilken Dörrie Committed by Chromium LUCI CQ

[Passwords] Blocklist in /c/pwm/core/browser/{android_affiliation,sync}

This change replaces usages of Blacklist with Blocklist in
components/password_manager/core/browser/android_affiliation and
components/password_manager/core/browser/sync.

Bug: 1147799
Change-Id: I3f186a860288b3e25607b65bdfde40d1b5ce15f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2579792Reviewed-by: default avatarMohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835141}
parent f708140c
...@@ -152,7 +152,7 @@ PasswordForm GetTestAndroidCredentials(const char* signon_realm) { ...@@ -152,7 +152,7 @@ PasswordForm GetTestAndroidCredentials(const char* signon_realm) {
return form; return form;
} }
PasswordForm GetTestBlacklistedAndroidCredentials(const char* signon_realm) { PasswordForm GetTestBlocklistedAndroidCredentials(const char* signon_realm) {
PasswordForm form = GetTestAndroidCredentials(signon_realm); PasswordForm form = GetTestAndroidCredentials(signon_realm);
form.blocked_by_user = true; form.blocked_by_user = true;
return form; return form;
...@@ -210,7 +210,7 @@ class AffiliatedMatchHelperTest : public testing::Test { ...@@ -210,7 +210,7 @@ class AffiliatedMatchHelperTest : public testing::Test {
void AddAndroidAndNonAndroidTestLogins() { void AddAndroidAndNonAndroidTestLogins() {
AddLogin(GetTestAndroidCredentials(kTestAndroidRealmAlpha3)); AddLogin(GetTestAndroidCredentials(kTestAndroidRealmAlpha3));
AddLogin(GetTestAndroidCredentials(kTestAndroidRealmBeta2)); AddLogin(GetTestAndroidCredentials(kTestAndroidRealmBeta2));
AddLogin(GetTestBlacklistedAndroidCredentials(kTestAndroidRealmBeta3)); AddLogin(GetTestBlocklistedAndroidCredentials(kTestAndroidRealmBeta3));
AddLogin(GetTestAndroidCredentials(kTestAndroidRealmGamma)); AddLogin(GetTestAndroidCredentials(kTestAndroidRealmGamma));
AddLogin(GetTestAndroidCredentials(kTestWebRealmAlpha1)); AddLogin(GetTestAndroidCredentials(kTestWebRealmAlpha1));
...@@ -220,7 +220,7 @@ class AffiliatedMatchHelperTest : public testing::Test { ...@@ -220,7 +220,7 @@ class AffiliatedMatchHelperTest : public testing::Test {
void RemoveAndroidAndNonAndroidTestLogins() { void RemoveAndroidAndNonAndroidTestLogins() {
RemoveLogin(GetTestAndroidCredentials(kTestAndroidRealmAlpha3)); RemoveLogin(GetTestAndroidCredentials(kTestAndroidRealmAlpha3));
RemoveLogin(GetTestAndroidCredentials(kTestAndroidRealmBeta2)); RemoveLogin(GetTestAndroidCredentials(kTestAndroidRealmBeta2));
RemoveLogin(GetTestBlacklistedAndroidCredentials(kTestAndroidRealmBeta3)); RemoveLogin(GetTestBlocklistedAndroidCredentials(kTestAndroidRealmBeta3));
RemoveLogin(GetTestAndroidCredentials(kTestAndroidRealmGamma)); RemoveLogin(GetTestAndroidCredentials(kTestAndroidRealmGamma));
RemoveLogin(GetTestAndroidCredentials(kTestWebRealmAlpha1)); RemoveLogin(GetTestAndroidCredentials(kTestWebRealmAlpha1));
......
...@@ -99,7 +99,7 @@ PasswordForm MakePasswordForm(const std::string& signon_realm) { ...@@ -99,7 +99,7 @@ PasswordForm MakePasswordForm(const std::string& signon_realm) {
return form; return form;
} }
PasswordForm MakeBlacklistedForm(const std::string& signon_realm) { PasswordForm MakeBlocklistedForm(const std::string& signon_realm) {
PasswordForm form; PasswordForm form;
form.url = GURL("http://www.origin.com"); form.url = GURL("http://www.origin.com");
form.signon_realm = signon_realm; form.signon_realm = signon_realm;
...@@ -942,14 +942,14 @@ TEST_F(PasswordSyncBridgeTest, ShouldNotifyUnsyncedCredentialsIfAccountStore) { ...@@ -942,14 +942,14 @@ TEST_F(PasswordSyncBridgeTest, ShouldNotifyUnsyncedCredentialsIfAccountStore) {
const std::string kPrimaryKeyUnsyncedCredentialStr = "1000"; const std::string kPrimaryKeyUnsyncedCredentialStr = "1000";
const std::string kPrimaryKeySyncedCredentialStr = "1001"; const std::string kPrimaryKeySyncedCredentialStr = "1001";
const std::string kPrimaryKeyUnsyncedDeletionStr = "1002"; const std::string kPrimaryKeyUnsyncedDeletionStr = "1002";
const std::string kPrimaryKeyUnsyncedBlacklistStr = "1003"; const std::string kPrimaryKeyUnsyncedBlocklistStr = "1003";
ON_CALL(mock_processor(), IsEntityUnsynced(kPrimaryKeyUnsyncedCredentialStr)) ON_CALL(mock_processor(), IsEntityUnsynced(kPrimaryKeyUnsyncedCredentialStr))
.WillByDefault(Return(true)); .WillByDefault(Return(true));
ON_CALL(mock_processor(), IsEntityUnsynced(kPrimaryKeySyncedCredentialStr)) ON_CALL(mock_processor(), IsEntityUnsynced(kPrimaryKeySyncedCredentialStr))
.WillByDefault(Return(false)); .WillByDefault(Return(false));
ON_CALL(mock_processor(), IsEntityUnsynced(kPrimaryKeyUnsyncedDeletionStr)) ON_CALL(mock_processor(), IsEntityUnsynced(kPrimaryKeyUnsyncedDeletionStr))
.WillByDefault(Return(true)); .WillByDefault(Return(true));
ON_CALL(mock_processor(), IsEntityUnsynced(kPrimaryKeyUnsyncedBlacklistStr)) ON_CALL(mock_processor(), IsEntityUnsynced(kPrimaryKeyUnsyncedBlocklistStr))
.WillByDefault(Return(true)); .WillByDefault(Return(true));
sync_pb::EntityMetadata is_deletion_metadata; sync_pb::EntityMetadata is_deletion_metadata;
...@@ -968,7 +968,7 @@ TEST_F(PasswordSyncBridgeTest, ShouldNotifyUnsyncedCredentialsIfAccountStore) { ...@@ -968,7 +968,7 @@ TEST_F(PasswordSyncBridgeTest, ShouldNotifyUnsyncedCredentialsIfAccountStore) {
batch->AddMetadata( batch->AddMetadata(
kPrimaryKeyUnsyncedDeletionStr, kPrimaryKeyUnsyncedDeletionStr,
std::make_unique<sync_pb::EntityMetadata>(is_deletion_metadata)); std::make_unique<sync_pb::EntityMetadata>(is_deletion_metadata));
batch->AddMetadata(kPrimaryKeyUnsyncedBlacklistStr, batch->AddMetadata(kPrimaryKeyUnsyncedBlocklistStr,
std::make_unique<sync_pb::EntityMetadata>( std::make_unique<sync_pb::EntityMetadata>(
is_not_deletion_metadata)); is_not_deletion_metadata));
return batch; return batch;
...@@ -978,19 +978,19 @@ TEST_F(PasswordSyncBridgeTest, ShouldNotifyUnsyncedCredentialsIfAccountStore) { ...@@ -978,19 +978,19 @@ TEST_F(PasswordSyncBridgeTest, ShouldNotifyUnsyncedCredentialsIfAccountStore) {
// because the deletion is supposed to have already removed such form. // because the deletion is supposed to have already removed such form.
const int kPrimaryKeyUnsyncedCredential = 1000; const int kPrimaryKeyUnsyncedCredential = 1000;
const int kPrimaryKeySyncedCredential = 1001; const int kPrimaryKeySyncedCredential = 1001;
const int kPrimaryKeyUnsyncedBlacklist = 1003; const int kPrimaryKeyUnsyncedBlocklist = 1003;
PasswordForm unsynced_credential = MakePasswordForm(kSignonRealm1); PasswordForm unsynced_credential = MakePasswordForm(kSignonRealm1);
PasswordForm synced_credential = MakePasswordForm(kSignonRealm2); PasswordForm synced_credential = MakePasswordForm(kSignonRealm2);
PasswordForm unsynced_blacklist = MakeBlacklistedForm(kSignonRealm3); PasswordForm unsynced_blocklist = MakeBlocklistedForm(kSignonRealm3);
fake_db()->AddLoginForPrimaryKey(kPrimaryKeyUnsyncedCredential, fake_db()->AddLoginForPrimaryKey(kPrimaryKeyUnsyncedCredential,
unsynced_credential); unsynced_credential);
fake_db()->AddLoginForPrimaryKey(kPrimaryKeySyncedCredential, fake_db()->AddLoginForPrimaryKey(kPrimaryKeySyncedCredential,
synced_credential); synced_credential);
fake_db()->AddLoginForPrimaryKey(kPrimaryKeyUnsyncedBlacklist, fake_db()->AddLoginForPrimaryKey(kPrimaryKeyUnsyncedBlocklist,
unsynced_blacklist); unsynced_blocklist);
// The notification should only contain new credentials that are unsynced, // The notification should only contain new credentials that are unsynced,
// ignoring both synced ones, deletion entries and blacklists. // ignoring both synced ones, deletion entries and blocklists.
EXPECT_CALL(*mock_password_store_sync(), EXPECT_CALL(*mock_password_store_sync(),
NotifyUnsyncedCredentialsWillBeDeleted( NotifyUnsyncedCredentialsWillBeDeleted(
UnorderedElementsAre(unsynced_credential))); UnorderedElementsAre(unsynced_credential)));
......
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