chromium/chrome/browser/sync/test/integration/webauthn_credentials_helper.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/sync/test/integration/webauthn_credentials_helper.h"

#include <vector>

#include "base/rand_util.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/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/webauthn/passkey_model_factory.h"
#include "components/sync/base/data_type.h"
#include "components/sync/protocol/sync_entity.pb.h"
#include "components/sync/protocol/webauthn_credential_specifics.pb.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"

namespace webauthn_credentials_helper {

test;

namespace {

// Passkey creation timestamps are assumed to increase monotonically to get
// expected behaviour around shadowed credentials. This global tracks the
// "current" timestamp, and is increased on each use.
int g_timestamp =;

class WebAuthnCredentialsSyncIdEqualsChecker
    : public MultiClientStatusChangeChecker {};

}  // namespace

PasskeySyncActiveChecker::PasskeySyncActiveChecker(
    syncer::SyncServiceImpl* service)
    :{}
PasskeySyncActiveChecker::~PasskeySyncActiveChecker() = default;

bool PasskeySyncActiveChecker::IsExitConditionSatisfied(std::ostream* os) {}

LocalPasskeysChangedChecker::LocalPasskeysChangedChecker(int profile)
    :{}

LocalPasskeysChangedChecker::~LocalPasskeysChangedChecker() = default;

bool LocalPasskeysChangedChecker::IsExitConditionSatisfied(std::ostream* os) {}

void LocalPasskeysChangedChecker::OnPasskeysChanged(
    const std::vector<webauthn::PasskeyModelChange>& changes) {}

void LocalPasskeysChangedChecker::OnPasskeyModelShuttingDown() {}

LocalPasskeysMatchChecker::LocalPasskeysMatchChecker(int profile,
                                                     Matcher matcher)
    :{}

LocalPasskeysMatchChecker::~LocalPasskeysMatchChecker() = default;

bool LocalPasskeysMatchChecker::IsExitConditionSatisfied(std::ostream* os) {}

void LocalPasskeysMatchChecker::OnPasskeysChanged(
    const std::vector<webauthn::PasskeyModelChange>& changes) {}

void LocalPasskeysMatchChecker::OnPasskeyModelShuttingDown() {}

ServerPasskeysMatchChecker::ServerPasskeysMatchChecker(Matcher matcher)
    :{}

ServerPasskeysMatchChecker::~ServerPasskeysMatchChecker() = default;

bool ServerPasskeysMatchChecker::IsExitConditionSatisfied(std::ostream* os) {}

PasskeyChangeObservationChecker::PasskeyChangeObservationChecker(
    int profile,
    ChangeList expected_changes)
    :{}

PasskeyChangeObservationChecker::~PasskeyChangeObservationChecker() = default;

bool PasskeyChangeObservationChecker::IsExitConditionSatisfied(
    std::ostream* os) {}

void PasskeyChangeObservationChecker::OnPasskeysChanged(
    const std::vector<webauthn::PasskeyModelChange>& changes) {}

void PasskeyChangeObservationChecker::OnPasskeyModelShuttingDown() {}

MockPasskeyModelObserver::MockPasskeyModelObserver(
    webauthn::PasskeyModel* model) {}

MockPasskeyModelObserver::~MockPasskeyModelObserver() = default;

webauthn::PasskeySyncBridge& GetModel(int profile_idx) {}

bool AwaitAllModelsMatch() {}

sync_pb::WebauthnCredentialSpecifics NewPasskey() {}

sync_pb::WebauthnCredentialSpecifics NewShadowingPasskey(
    const sync_pb::WebauthnCredentialSpecifics& shadowed) {}

}  // namespace webauthn_credentials_helper