chromium/components/device_signals/core/system_signals/file_system_service_unittest.cc

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

#include "components/device_signals/core/system_signals/file_system_service.h"

#include <array>
#include <vector>

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "components/device_signals/core/common/common_types.h"
#include "components/device_signals/core/system_signals/executable_metadata_service.h"
#include "components/device_signals/core/system_signals/mock_executable_metadata_service.h"
#include "components/device_signals/core/system_signals/mock_platform_delegate.h"
#include "components/device_signals/core/system_signals/platform_delegate.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Invoke;
Return;

namespace device_signals {

namespace {

GetFileSystemInfoOptions CreateOptions(const base::FilePath& path,
                                       bool compute_sha256,
                                       bool compute_executable_metadata) {}

std::string HexEncodeHash(const std::string& hashed_data) {}

std::optional<size_t> FindItemIndexByFilePath(
    const base::FilePath& expected_file_path,
    const std::vector<FileSystemItem>& items) {}

}  // namespace

class FileSystemServiceTest : public testing::Test {};

// Tests all possible PresenceValue outcomes.
TEST_F(FileSystemServiceTest, GetSignals_Presence) {}

// Tests calculating the hash for a file when requested, but not for a
// directory.
TEST_F(FileSystemServiceTest, GetSignals_Hash_Success) {}

// Tests that the FileSystemService uses the PlatformDelegate to collect
// the ExecutableMetadata only when requested.
TEST_F(FileSystemServiceTest, GetSignals_ExecutableMetadata) {}

}  // namespace device_signals