#include "net/base/filename_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_file_util.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "net/base/mime_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace net {
namespace {
struct FileCase { … };
struct GenerateFilenameCase { … };
std::wstring FilePathAsWString(const base::FilePath& path) { … }
base::FilePath WStringAsFilePath(const std::wstring& str) { … }
std::string GetLocaleWarningString() { … }
void RunGenerateFileNameTestCase(const GenerateFilenameCase* test_case) { … }
constexpr const base::FilePath::CharType* kSafePortableBasenames[] = …;
constexpr const base::FilePath::CharType* kUnsafePortableBasenames[] = …;
constexpr const base::FilePath::CharType* kUnsafePortableBasenamesForWin[] = …;
constexpr const base::FilePath::CharType* kSafePortableRelativePaths[] = …;
}
TEST(FilenameUtilTest, IsSafePortablePathComponent) { … }
TEST(FilenameUtilTest, IsSafePortableRelativePath) { … }
TEST(FilenameUtilTest, FileURLConversion) { … }
TEST(FilenameUtilTest, GenerateSafeFileName) { … }
TEST(FilenameUtilTest, GenerateFileName_Assumptions) { … }
TEST(FilenameUtilTest, GenerateFileName) { … }
TEST(FilenameUtilTest, IsReservedNameOnWindows) { … }
}