#include <stdint.h>
#include <limits>
#include <tuple>
#include "base/hash/hash.h"
#include "base/location.h"
#include "base/rand_util.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/uuid.h"
#include "build/build_config.h"
#include "chrome/browser/sync/test/integration/encryption_helper.h"
#include "chrome/browser/sync/test/integration/passwords_helper.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
#include "components/password_manager/core/browser/features/password_manager_features_util.h"
#include "components/password_manager/core/browser/password_form.h"
#include "components/password_manager/core/browser/password_manager_test_utils.h"
#include "components/password_manager/core/browser/password_store/password_store_interface.h"
#include "components/password_manager/core/common/password_manager_features.h"
#include "components/signin/public/base/signin_switches.h"
#include "components/sync/engine/cycle/entity_change_metric_recording.h"
#include "components/sync/test/fake_server_http_post_provider.h"
#include "content/public/test/browser_test.h"
#include "net/base/network_change_notifier.h"
AllProfilesContainSamePasswordForms;
AllProfilesContainSamePasswordFormsAsVerifier;
CreateTestPasswordForm;
GetAccountPasswordStoreInterface;
GetAllLogins;
GetLogins;
GetPasswordCount;
GetProfilePasswordStoreInterface;
GetVerifierPasswordCount;
GetVerifierProfilePasswordStoreInterface;
RemoveLogins;
InsecureType;
InsecurityMetadata;
IsMuted;
PasswordForm;
TriggerBackendNotification;
ElementsAre;
Pointee;
UnorderedElementsAre;
static const char* kValidPassphrase = …;
class TwoClientPasswordsSyncTest : public SyncTest { … };
class TwoClientPasswordsSyncTestWithVerifier
: public TwoClientPasswordsSyncTest { … };
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, E2E_ENABLED(Add)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
E2E_ENABLED(AddInTransportMode)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, E2E_ENABLED(Race)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, MergeWithTheMostRecent) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
E2E_ENABLED(SetPassphraseAndAddPassword)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTestWithVerifier, Update) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTestWithVerifier,
SharedPasswordMetadataAreSynced) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, AddTwice) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTestWithVerifier, Delete) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
SetPassphraseAndThenSetupSync) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, E2E_ONLY(DeleteTwo)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTestWithVerifier, DeleteAll) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, E2E_ENABLED(Merge)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, E2E_ONLY(TwoClientAddPass)) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTestWithVerifier,
AddImmediatelyAfterDelete) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
MergeFormsWithInsecureCredentials) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
AddFormWithInsecureCredentials) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest, RemoveInsecureCredentialss) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
InsecureCredentialUpdateMute) { … }
IN_PROC_BROWSER_TEST_F(
TwoClientPasswordsSyncTest,
MatchingDeletionsConflictDoesNotInvokeTrimmingEntitySpecifics) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
SyncPasswordNotesBetweenDevices) { … }
IN_PROC_BROWSER_TEST_F(TwoClientPasswordsSyncTest,
SyncPasswordWithEmptyNotesBetweenDevices) { … }