Commit 8b006c10 authored by Victor Hugo Vianna Silva's avatar Victor Hugo Vianna Silva Committed by Commit Bot

Remove unsynced deletion from fake_db in PasswordSyncBridge test

The ShouldNotifyUnsyncedCredentialsIfAccountStore test is updated
not to add any form for the primary key associated with a deletion
metadata, in order to correctly reflect the current implementation
of the password store.

Bug: None
Change-Id: Ib65349e4e152a6afca26f427640e6a9520d246ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2141898Reviewed-by: default avatarMohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Victor Vianna <victorvianna@google.com>
Cr-Commit-Position: refs/heads/master@{#757418}
parent 42140453
......@@ -902,9 +902,6 @@ TEST_F(PasswordSyncBridgeTest, ShouldNotifyUnsyncedCredentialsIfAccountStore) {
ON_CALL(*mock_password_store_sync(), IsAccountStore())
.WillByDefault(Return(true));
const int kPrimaryKeyUnsyncedCredential = 1000;
const int kPrimaryKeySyncedCredential = 1001;
const int kPrimaryKeyUnsyncedDeletion = 1002;
const std::string kPrimaryKeyUnsyncedCredentialStr = "1000";
const std::string kPrimaryKeySyncedCredentialStr = "1001";
const std::string kPrimaryKeyUnsyncedDeletionStr = "1002";
......@@ -934,15 +931,16 @@ TEST_F(PasswordSyncBridgeTest, ShouldNotifyUnsyncedCredentialsIfAccountStore) {
return batch;
});
// No form is added to the database for the unsynced deletion primary key,
// because the deletion is supposed to have already removed such form.
const int kPrimaryKeyUnsyncedCredential = 1000;
const int kPrimaryKeySyncedCredential = 1001;
autofill::PasswordForm unsynced_credential = MakePasswordForm(kSignonRealm1);
autofill::PasswordForm synced_credential = MakePasswordForm(kSignonRealm2);
autofill::PasswordForm unsynced_deletion = MakePasswordForm(kSignonRealm3);
fake_db()->AddLoginForPrimaryKey(kPrimaryKeyUnsyncedCredential,
unsynced_credential);
fake_db()->AddLoginForPrimaryKey(kPrimaryKeySyncedCredential,
synced_credential);
fake_db()->AddLoginForPrimaryKey(kPrimaryKeyUnsyncedDeletion,
unsynced_deletion);
// The notification should only contain new credentials that are unsynced,
// ignoring both synced ones and deletion entries.
......
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