#include "components/web_package/test_support/signed_web_bundles/web_bundle_signer.h"
#include <string_view>
#include "base/base_paths.h"
#include "base/containers/span.h"
#include "base/containers/to_vector.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/strings/stringprintf.h"
#include "components/web_package/web_bundle_builder.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace web_package {
namespace {
constexpr std::array<uint8_t, 32> kEd25519PublicKey = …;
constexpr std::array<uint8_t, 64> kEd25519PrivateKey = …;
constexpr std::array<uint8_t, 33> kEcdsaP256PublicKey = …;
constexpr std::array<uint8_t, 32> kEcdsaP256PrivateKey = …;
std::string GetTestFileContents(const base::FilePath& path) { … }
std::vector<uint8_t> GetStringAsBytes(std::string_view contents) { … }
std::vector<uint8_t> CreateUnsignedBundle() { … }
TEST(WebBundleSignerTest, SignedWebBundleByteByByteComparisonV2BlockEd25519) { … }
TEST(WebBundleSignerTest, SignedWebBundleByteByByteComparisonV2BlockEcdsaP256) { … }
TEST(WebBundleSignerTest, SignedWebBundleByteByByteComparisonV2BlockBothKeys) { … }
}
}