#include "services/network/trust_tokens/trust_token_store.h"
#include <map>
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/test/protobuf_matchers.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "services/network/public/cpp/trust_token_parameterization.h"
#include "services/network/public/mojom/clear_data_filter.mojom.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/trust_tokens/in_memory_trust_token_persister.h"
#include "services/network/trust_tokens/proto/public.pb.h"
#include "services/network/trust_tokens/proto/storage.pb.h"
#include "services/network/trust_tokens/suitable_trust_token_origin.h"
#include "services/network/trust_tokens/trust_token_parameterization.h"
#include "services/network/trust_tokens/types.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
#include "url/origin.h"
EqualsProto;
ElementsAre;
Optional;
namespace network::trust_tokens {
TEST(TrustTokenStoreTest, RecordsIssuances) { … }
TEST(TrustTokenStoreTest, DoesntReportMissingIssuanceTimestamps) { … }
TEST(TrustTokenStoreTest, DoesntReportNegativeTimeSinceLastIssuance) { … }
TEST(TrustTokenStoreTest, DoesntReportNegativeTimeSinceLastRedemption) { … }
TEST(TrustTokenStore, AssociatesToplevelsWithIssuers) { … }
TEST(TrustTokenStore, IssuerToplevelAssociationAtNumberOfAssociationsCap) { … }
TEST(TrustTokenStore, AddingTokensRespectsCapacity) { … }
TEST(TrustTokenStore, CountsTokens) { … }
TEST(TrustTokenStore, GetsAllStoredTokens) { … }
TEST(TrustTokenStore, GetsAllRedemptionRecordsByIssuerToplevelPair) { … }
TEST(TrustTokenStore, PrunesDataAssociatedWithRemovedKeyCommitments) { … }
TEST(TrustTokenStore, AddsTrustTokens) { … }
TEST(TrustTokenStore, RetrievesTrustTokensRespectingNontrivialPredicate) { … }
TEST(TrustTokenStore, DeletesSingleToken) { … }
TEST(TrustTokenStore, DeleteTokenForMissingIssuer) { … }
TEST(TrustTokenStore, SetsAndRetrievesRedemptionRecord) { … }
TEST(TrustTokenStore, RetrieveRedemptionRecordHandlesConfigWithNoRecord) { … }
TEST(TrustTokenStore, SetRedemptionRecordOverwritesExisting) { … }
namespace {
class LetterAExpiringExpiryDelegate
: public TrustTokenStore::RecordExpiryDelegate { … };
}
TEST(TrustTokenStore, DoesNotReturnStaleRedemptionRecord) { … }
TEST(TrustTokenStore, EmptyFilter) { … }
TEST(TrustTokenStore, EmptyFilterInKeepMatchesMode) { … }
TEST(TrustTokenStore, ClearsIssuerKeyedData) { … }
TEST(TrustTokenStore, ClearsToplevelKeyedData) { … }
TEST(TrustTokenStore, ClearsIssuerToplevelPairKeyedData) { … }
TEST(TrustTokenStore, ClearDataCanFilterByDomain) { … }
TEST(TrustTokenStore, RemovesDataForInvertedFilters) { … }
TEST(TrustTokenStore, RemovesDataForNullFilter) { … }
TEST(TrustTokenStore, RemovesTrustTokensByIssuer) { … }
TEST(TrustTokenStore, RemoveReturnsFalseWhenNoTrustTokensAreDeleted) { … }
TEST(TrustTokenStore, RemovesTrustTokensByIssuerAndKeepsOthers) { … }
TEST(TrustTokenStore, RedemptionLimit) { … }
TEST(TrustTokenStore, ClearDataForPredicate) { … }
}