chromium/net/disk_cache/blockfile/block_files_unittest.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "base/files/file_enumerator.h"
#include "base/files/file_util.h"
#include "build/chromeos_buildflags.h"
#include "net/disk_cache/blockfile/block_files.h"
#include "net/disk_cache/disk_cache.h"
#include "net/disk_cache/disk_cache_test_base.h"
#include "net/disk_cache/disk_cache_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"

Time;

namespace {

// Returns the number of files in this folder.
int NumberOfFiles(const base::FilePath& path) {}

}  // namespace

namespace disk_cache {

#if BUILDFLAG(IS_CHROMEOS_ASH)
// Flaky on ChromeOS: https://crbug.com/1156795
#define MAYBE_BlockFiles_Grow
#else
#define MAYBE_BlockFiles_Grow
#endif
TEST_F(DiskCacheTest, MAYBE_BlockFiles_Grow) {}

// We should be able to delete empty block files.
TEST_F(DiskCacheTest, BlockFiles_Shrink) {}

// Handling of block files not properly closed.
TEST_F(DiskCacheTest, BlockFiles_Recover) {}

// Handling of truncated files.
TEST_F(DiskCacheTest, BlockFiles_ZeroSizeFile) {}

// Handling of truncated files (non empty).
TEST_F(DiskCacheTest, BlockFiles_TruncatedFile) {}

// Tests detection of out of sync counters.
TEST_F(DiskCacheTest, BlockFiles_Counters) {}

// An invalid file can be detected after init.
TEST_F(DiskCacheTest, BlockFiles_InvalidFile) {}

// Tests that we add and remove blocks correctly.
TEST_F(DiskCacheTest, AllocationMap) {}

}  // namespace disk_cache