#include "components/device_signals/core/system_signals/posix/posix_platform_delegate.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/scoped_environment_variable_override.h"
#include "base/strings/stringprintf.h"
#include "base/uuid.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device_signals {
namespace {
constexpr char kHome2EnvVariableName[] = …;
constexpr char kNonsenseEnvVariableName[] = …;
constexpr base::FilePath::CharType kTestFileName[] = …);
}
class PosixPlatformDelegateTest : public testing::Test { … };
TEST_F(PosixPlatformDelegateTest, ResolveFilePath_Absolute) { … }
TEST_F(PosixPlatformDelegateTest, ResolveFilePath_Tilde) { … }
TEST_F(PosixPlatformDelegateTest, ResolveFilePath_EnvVar) { … }
TEST_F(PosixPlatformDelegateTest, ResolveFilePath_EnvVarToTilde) { … }
TEST_F(PosixPlatformDelegateTest, ResolveFilePath_InvalidEnvVar) { … }
TEST_F(PosixPlatformDelegateTest, ResolveFilePath_CyclicEnvVar) { … }
TEST_F(PosixPlatformDelegateTest, ResolveFilePath_EnvVarMissingSeparator) { … }
TEST_F(PosixPlatformDelegateTest, ResolveFilePath_PathTraversal) { … }
}