#include "chrome/browser/web_applications/isolated_web_apps/key_distribution/iwa_key_distribution_info_provider.h"
#include "base/base64.h"
#include "base/containers/extend.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/strings/stringprintf.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/task_environment.h"
#include "base/version.h"
#include "chrome/browser/web_applications/isolated_web_apps/iwa_identity_validator.h"
#include "chrome/browser/web_applications/isolated_web_apps/key_distribution/proto/key_distribution.pb.h"
#include "chrome/browser/web_applications/isolated_web_apps/test/key_distribution/test_utils.h"
#include "components/web_package/signed_web_bundles/signed_web_bundle_signature_verifier.h"
#include "components/web_package/test_support/signed_web_bundles/signature_verifier_test_utils.h"
#include "components/web_package/test_support/signed_web_bundles/web_bundle_signer.h"
#include "components/web_package/web_bundle_builder.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace web_app {
namespace {
ErrorIs;
HasValue;
_;
Eq;
Field;
FieldsAre;
HasSubstr;
IsEmpty;
Property;
VariantWith;
ComponentUpdateError;
constexpr std::array<uint8_t, 4> kExpectedKey = …;
constexpr char kWebBundleId[] = …;
IwaKeyDistribution CreateValidData() { … }
}
class IwaIwaKeyDistributionInfoProviderTest : public testing::Test { … };
TEST_F(IwaIwaKeyDistributionInfoProviderTest, LoadComponent) { … }
TEST_F(IwaIwaKeyDistributionInfoProviderTest,
LoadComponentAndThenStaleComponent) { … }
TEST_F(IwaIwaKeyDistributionInfoProviderTest, LoadComponentWrongPath) { … }
TEST_F(IwaIwaKeyDistributionInfoProviderTest, LoadComponentFaultyData) { … }
class SignedWebBundleSignatureVerifierWithKeyDistributionTest
: public testing::Test { … };
TEST_F(SignedWebBundleSignatureVerifierWithKeyDistributionTest,
VerifySignaturesWithKeyDistribution) { … }
}