#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_WEBAUTHN_CREDENTIALS_HELPER_H_
#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_WEBAUTHN_CREDENTIALS_HELPER_H_
#include <vector>
#include "base/scoped_observation.h"
#include "chrome/browser/sync/test/integration/fake_server_match_status_checker.h"
#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h"
#include "chrome/browser/sync/test/integration/status_change_checker.h"
#include "components/webauthn/core/browser/passkey_model.h"
#include "components/webauthn/core/browser/passkey_model_change.h"
#include "components/webauthn/core/browser/passkey_sync_bridge.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace sync_pb {
class SyncEntity;
class WebauthnCredentialSpecifics;
}
namespace webauthn_credentials_helper {
inline constexpr char kTestRpId[] = …;
class PasskeySyncActiveChecker : public SingleClientStatusChangeChecker { … };
class LocalPasskeysChangedChecker : public StatusChangeChecker,
public webauthn::PasskeyModel::Observer { … };
class LocalPasskeysMatchChecker : public StatusChangeChecker,
public webauthn::PasskeyModel::Observer { … };
class ServerPasskeysMatchChecker
: public fake_server::FakeServerMatchStatusChecker { … };
class PasskeyChangeObservationChecker
: public StatusChangeChecker,
public webauthn::PasskeyModel::Observer { … };
class MockPasskeyModelObserver : public webauthn::PasskeyModel::Observer { … };
webauthn::PasskeySyncBridge& GetModel(int profile_idx);
bool AwaitAllModelsMatch();
sync_pb::WebauthnCredentialSpecifics NewPasskey();
sync_pb::WebauthnCredentialSpecifics NewShadowingPasskey(
const sync_pb::WebauthnCredentialSpecifics& shadowed);
MATCHER_P(EntityHasSyncId, expected_sync_id, "") { … }
MATCHER_P(EntityHasUsername, expected_username, "") { … }
MATCHER_P(EntityHasDisplayName, expected_display_name, "") { … }
MATCHER_P(PasskeySpecificsEq, expected, "") { … }
MATCHER_P(PasskeyHasSyncId, expected_sync_id, "") { … }
MATCHER_P(PasskeyHasRpId, expected_rp_id, "") { … }
MATCHER_P(PasskeyHasUserId, expected_user_id, "") { … }
MATCHER_P(PasskeyHasDisplayName, expected_display_name, "") { … }
}
#endif