chromium/chrome/browser/sync/test/integration/single_client_outgoing_password_sharing_invitation_test.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 <array>
#include <string>
#include <vector>

#include "base/containers/span.h"
#include "base/strings/utf_string_conversions.h"
#include "base/uuid.h"
#include "build/build_config.h"
#include "chrome/browser/password_manager/password_sender_service_factory.h"
#include "chrome/browser/sync/test/integration/fake_server_match_status_checker.h"
#include "chrome/browser/sync/test/integration/password_sharing_invitation_helper.h"
#include "chrome/browser/sync/test/integration/sync_service_impl_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.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/sharing/password_sender_service.h"
#include "components/password_manager/core/browser/sharing/recipient_info.h"
#include "components/sync/engine/nigori/cross_user_sharing_public_private_key_pair.h"
#include "components/sync/protocol/nigori_specifics.pb.h"
#include "components/sync/protocol/password_sharing_invitation_specifics.pb.h"
#include "components/sync/test/fake_server_nigori_helper.h"
#include "content/public/test/browser_test.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/include/openssl/curve25519.h"

namespace {

PasswordForm;
PasswordRecipient;
PasswordSenderService;
PublicKey;
UnorderedElementsAre;

constexpr char kRecipientUserId[] =;
constexpr char kPasswordValue[] =;
constexpr char kSignonRealm[] =;
constexpr char kOrigin[] =;
constexpr char kUsernameElement[] =;
constexpr char kUsernameValue[] =;
constexpr char kPasswordElement[] =;
constexpr char kPasswordDisplayName[] =;
constexpr char kPasswordAvatarUrl[] =;

constexpr uint32_t kRecipientPublicKeyVersion =;

PasswordForm MakePasswordForm() {}

class InvitationCommittedChecker
    : public fake_server::FakeServerMatchStatusChecker {};

class SingleClientOutgoingPasswordSharingInvitationTest : public SyncTest {};

IN_PROC_BROWSER_TEST_F(SingleClientOutgoingPasswordSharingInvitationTest,
                       ShouldCommitSentPassword) {}

IN_PROC_BROWSER_TEST_F(SingleClientOutgoingPasswordSharingInvitationTest,
                       ShouldCommitSentPasswordGroup) {}

// The unconsented primary account isn't supported on ChromeOS.
// TODO(crbug.com/358053884): enable on Android once transport mode for
// Passwords is supported.
#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID)
IN_PROC_BROWSER_TEST_F(SingleClientOutgoingPasswordSharingInvitationTest,
                       ShouldCommitSentPasswordInTransportMode) {}
#endif  // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID)

}  // namespace