chromium/components/web_package/signed_web_bundles/signed_web_bundle_id_unittest.cc

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

#include "components/web_package/signed_web_bundles/signed_web_bundle_id.h"

#include <array>
#include <optional>
#include <string_view>
#include <tuple>
#include <utility>

#include "base/containers/span.h"
#include "base/ranges/algorithm.h"
#include "base/test/bind.h"
#include "base/test/gmock_expected_support.h"
#include "components/web_package/signed_web_bundles/ecdsa_p256_public_key.h"
#include "components/web_package/signed_web_bundles/ed25519_public_key.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace web_package {

namespace {

// Some random bytes that are treated as an Ed25519 public key.
const std::array<uint8_t, 32> kEd25519PublicKeyBytes(
    {});

constexpr std::string_view kEd25519SignedWebBundleId =;

// Some random bytes to use as a proxy mode key.
const std::array<uint8_t, 32> kProxyModeBytes(
    {});

constexpr std::string_view kProxyModeSignedWebBundleId =;

// Valid ECDSA P-256 public key.
constexpr std::array<uint8_t, 33> kEcdsaP256PublicKeyBytes =;

constexpr std::string_view kEcdsaP256SignedWebBundleId =;

}  // namespace

class SignedWebBundleIdValidTest
    : public ::testing::TestWithParam<
          std::tuple<std::string, SignedWebBundleId::Type>> {};

TEST_P(SignedWebBundleIdValidTest, ParseValidIDs) {}

INSTANTIATE_TEST_SUITE_P();

class SignedWebBundleIdInvalidTest
    : public ::testing::TestWithParam<std::pair<std::string, std::string>> {};

TEST_P(SignedWebBundleIdInvalidTest, ParseInvalidIDs) {}

INSTANTIATE_TEST_SUITE_P();

TEST(SignedWebBundleIdTest, Comparators) {}

TEST(SignedWebBundleIdTest, CreateForEd25519PublicKey) {}

TEST(SignedWebBundleIdTest, CreateForEcdsaP256PublicKey) {}

TEST(SignedWebBundleIdTest, CreateForProxyMode) {}

TEST(SignedWebBundleIdTest, CreateRandomForProxyMode) {}

}  // namespace web_package