#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "storage/browser/file_system/obfuscated_file_util_memory_delegate.h"
#include <memory>
#include <string>
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "build/build_config.h"
#include "net/base/io_buffer.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace storage {
namespace {
CopyOrMoveOption;
CopyOrMoveOptionSet;
}
class ObfuscatedFileUtilMemoryDelegateTest : public testing::Test { … };
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CreateOrOpenFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CreateAndDeleteFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, PathNormalization) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, PathBeyondRoot) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, EnsureFileExists) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CreateAndDeleteDirectory) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest,
CreateAndDeleteDirectoryRecursive) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, DeleteNoneEmptyDirectory) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, TouchFileAndGetFileInfo) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, Truncate) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CopyFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CopyForeignFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CopyFileNonExistingFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CopyDirectoryOverFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CopyFileOverDirectory) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CopyFileToNonExistingDirectory) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, CopyFileAsChildOfOtherFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, MoveFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, MoveNonExistingFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, MoveDirectoryOverDirectory) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, MoveFileOverDirectory) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, MoveFileToNonExistingDirectory) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, MoveFileAsChildOfOtherFile) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, MoveFile_Directory) { … }
#if !BUILDFLAG(IS_WIN)
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, MoveFile_OverwriteEmptyDirectory) { … }
#endif
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, PreserveLastModified_NoSync) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, PreserveLastModified_Sync) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, PreserveLastModified_Move) { … }
TEST_F(ObfuscatedFileUtilMemoryDelegateTest, ComputeDirectorySize) { … }
}