#include "services/network/shared_dictionary/shared_dictionary_disk_cache.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/numerics/safe_conversions.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/test/test_file_util.h"
#include "build/build_config.h"
#include "net/base/io_buffer.h"
#include "net/base/test_completion_callback.h"
#include "net/disk_cache/disk_cache_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace network {
namespace {
const std::string kTestKey = …;
const std::string kTestData = …;
}
class SharedDictionaryDiskCacheTest : public testing::Test { … };
TEST_F(SharedDictionaryDiskCacheTest, CreateEntry) { … }
TEST_F(SharedDictionaryDiskCacheTest, CreateEntryWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, OpenNonExistentEntryFailure) { … }
TEST_F(SharedDictionaryDiskCacheTest,
OpenNonExistentEntryFailureWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, OpenEntrySuccess) { … }
TEST_F(SharedDictionaryDiskCacheTest, DoomEntry) { … }
TEST_F(SharedDictionaryDiskCacheTest, DoomEntryWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, ClearAll) { … }
TEST_F(SharedDictionaryDiskCacheTest, ClearAllWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, CreateIterator) { … }
TEST_F(SharedDictionaryDiskCacheTest, CreateIteratorWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, CreateWriteOpenReadDeleteReopen) { … }
#if !BUILDFLAG(IS_FUCHSIA)
TEST_F(SharedDictionaryDiskCacheTest, CreateEntryCorruptedFailure) { … }
TEST_F(SharedDictionaryDiskCacheTest,
CreateEntryWhileInitializingCorruptedFailure) { … }
TEST_F(SharedDictionaryDiskCacheTest, OpenEntryCorruptedFailure) { … }
TEST_F(SharedDictionaryDiskCacheTest,
OpenEntryCorruptedFailureWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, DoomEntryCorruptedFailure) { … }
TEST_F(SharedDictionaryDiskCacheTest,
DoomEntryCorruptedFailureWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, ClearAllCorruptedFailure) { … }
TEST_F(SharedDictionaryDiskCacheTest,
ClearAllCorruptedFailureWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, CreateIteratorCorruptedFailure) { … }
TEST_F(SharedDictionaryDiskCacheTest,
CreateIteratorCorruptedFailureWhileInitializing) { … }
TEST_F(SharedDictionaryDiskCacheTest, DeletedWhileRuningDidCreateBackend) { … }
#endif
}