chromium/services/network/trust_tokens/expiry_inspecting_record_expiry_delegate_unittest.cc

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

#include "services/network/trust_tokens/expiry_inspecting_record_expiry_delegate.h"

#include <vector>

#include "base/test/task_environment.h"
#include "components/cbor/values.h"
#include "components/cbor/writer.h"
#include "services/network/public/mojom/trust_tokens.mojom.h"
#include "services/network/trust_tokens/proto/public.pb.h"
#include "services/network/trust_tokens/suitable_trust_token_origin.h"
#include "services/network/trust_tokens/trust_token_key_commitment_getter.h"
#include "services/network/trust_tokens/trust_token_parameterization.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace network {

namespace {

class FixedKeyCommitmentGetter
    : public SynchronousTrustTokenKeyCommitmentGetter {};

}  // namespace

// If storage contains no key commitment result for the record's issuer
// whatsoever, then, in particular, it doesn't contain the token verification
// key associated with the record; this means that the record should be marked
// as expired.
TEST(ExpiryInspectingRecordExpiryDelegate, ExpiresRecordWhenNoKeys) {}

// When we have a key commitment result for the record's issuer, but the
// record's key is not in the commitment result, the record should be marked
// expired.
TEST(ExpiryInspectingRecordExpiryDelegate, ExpiresRecordWithNoMatchingKey) {}

// Lifetime expired
TEST(ExpiryInspectingRecordExpiryDelegate, ExpiresRecordOutOfLifetime) {}

// Zero Lifetime
TEST(ExpiryInspectingRecordExpiryDelegate, ExpiresRecordWithZeroLifetime) {}

// When a record's issuer has the record's key in its current commitment, the
// record should not be marked as expired.
TEST(ExpiryInspectingRecordExpiryDelegate,
     DoesntExpireUnexpiredRecordLifetimeNotSet) {}

TEST(ExpiryInspectingRecordExpiryDelegate,
     DoesntExpireUnexpiredRecordLifetimeSet) {}

}  // namespace network