#include "components/search_provider_logos/logo_cache.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/run_loop.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace search_provider_logos {
LogoMetadata GetExampleMetadata() { … }
LogoMetadata GetExampleMetadata2() { … }
base::RefCountedString* CreateExampleImage(size_t num_bytes) { … }
std::unique_ptr<EncodedLogo> GetExampleLogo() { … }
std::unique_ptr<EncodedLogo> GetExampleLogo2() { … }
std::unique_ptr<EncodedLogo> GetExampleLogoWithoutImage() { … }
void ExpectMetadataEqual(const LogoMetadata& expected_metadata,
const LogoMetadata& actual_metadata) { … }
void ExpectLogosEqual(const EncodedLogo& expected_logo,
const EncodedLogo& actual_logo) { … }
void ShortenFile(base::FilePath path) { … }
class LogoCacheTest : public ::testing::Test { … };
TEST(LogoCacheSerializationTest, SerializeMetadata) { … }
TEST(LogoCacheSerializationTest, DeserializeCorruptMetadata) { … }
TEST_F(LogoCacheTest, StoreAndRetrieveMetadata) { … }
TEST_F(LogoCacheTest, StoreAndRetrieveLogo) { … }
TEST_F(LogoCacheTest, StoreAndRetrieveLogoWithoutImage) { … }
TEST_F(LogoCacheTest, RetrieveCorruptMetadata) { … }
TEST_F(LogoCacheTest, RetrieveCorruptLogo) { … }
}