chromium/services/network/shared_dictionary/shared_dictionary_disk_cache_unittest.cc

// Copyright 2023 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/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 =;
}  // namespace

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)
// CorruptDiskCache() doesn't work on Fuchsia. So disabling the following tests
// on 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  // !BUILDFLAG(IS_FUCHSIA)

}  // namespace network