chromium/storage/browser/file_system/native_file_util_unittest.cc

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

#include <stdint.h>

#include <memory>
#include <set>

#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 "storage/browser/file_system/native_file_util.h"
#include "testing/gtest/include/gtest/gtest.h"

#if BUILDFLAG(IS_ANDROID)
#include "base/test/android/content_uri_test_utils.h"
#endif

#if BUILDFLAG(IS_WIN)
#include "windows.h"
#endif  // BUILDFLAG(IS_WIN)

namespace storage {
namespace {

CopyOrMoveOption;
CopyOrMoveOptionSet;

}  // namespace

class NativeFileUtilTest : public testing::Test {};

TEST_F(NativeFileUtilTest, CreateCloseAndDeleteFile) {}

TEST_F(NativeFileUtilTest, EnsureFileExists) {}

TEST_F(NativeFileUtilTest, CreateAndDeleteDirectory) {}

// TODO(crbug.com/40511450): Remove this test once last_access_time has
// been removed after PPAPI has been deprecated. Fuchsia does not support touch,
// which breaks this test that relies on it. Since PPAPI is being deprecated,
// this test is excluded from the Fuchsia build.
// See https://crbug.com/1077456 for details.
#if !BUILDFLAG(IS_FUCHSIA)
TEST_F(NativeFileUtilTest, TouchFileAndGetFileInfo) {}
#endif  // !BUILDFLAG(IS_FUCHSIA)

TEST_F(NativeFileUtilTest, CreateFileEnumerator) {}

TEST_F(NativeFileUtilTest, Truncate) {}

TEST_F(NativeFileUtilTest, CopyFile) {}

TEST_F(NativeFileUtilTest, MoveFile) {}

TEST_F(NativeFileUtilTest, MoveFile_Directory) {}

#if !BUILDFLAG(IS_WIN)
TEST_F(NativeFileUtilTest, MoveFile_OverwriteEmptyDirectory) {}
#endif

TEST_F(NativeFileUtilTest, PreserveLastModified) {}

// This test is disabled on Fuchsia because file permissions are not supported.
#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_WIN)
TEST_F(NativeFileUtilTest, PreserveDestinationPermissions) {}
#endif  // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_WIN)

// This test is disabled on Fuchsia because file permissions are not supported.
#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_WIN)
TEST_F(NativeFileUtilTest, PreserveLastModifiedAndDestinationPermissions) {}
#endif  // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_WIN)

}  // namespace storage