#include "components/safe_browsing/core/browser/db/hash_prefix_map.h"
#include <type_traits>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/safe_browsing/core/common/features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/platform_test.h"
namespace safe_browsing {
namespace {
ElementsAre;
class HashPrefixMapTest : public PlatformTest { … };
TEST_F(HashPrefixMapTest, WriteFile) { … }
TEST_F(HashPrefixMapTest, FailedWrite) { … }
TEST_F(HashPrefixMapTest, WriteMultipleFiles) { … }
TEST_F(HashPrefixMapTest, BuffersWrites) { … }
TEST_F(HashPrefixMapTest, ReadFile) { … }
TEST_F(HashPrefixMapTest, ReadMultipleFiles) { … }
TEST_F(HashPrefixMapTest, ReadFileInvalid) { … }
TEST_F(HashPrefixMapTest, ReadFileWrongSize) { … }
TEST_F(HashPrefixMapTest, ReadFileInvalidSize) { … }
TEST_F(HashPrefixMapTest, WriteAndReadFile) { … }
TEST_F(HashPrefixMapTest, ClearingMapBeforeWriteDeletesFile) { … }
TEST_F(HashPrefixMapTest, ReadsAndWritesFileOffsets) { … }
TEST_F(HashPrefixMapTest, FillsMissingOffsets) { … }
TEST_F(HashPrefixMapTest, UsesFileOffsets) { … }
TEST_F(HashPrefixMapTest, MigratesFileOffsets) { … }
TEST_F(HashPrefixMapTest, NoOffsetMap) { … }
TEST_F(HashPrefixMapTest, ValidAfterWrite) { … }
}
}