#include "remoting/host/host_config.h"
#include <optional>
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/json/json_writer.h"
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace remoting {
namespace {
constexpr char kHostOwnerJid[] = …;
constexpr char kHostOwnerEmail[] = …;
constexpr char kServiceAccountEmail[] = …;
constexpr char kHostId[] = …;
constexpr char kHostName[] = …;
constexpr char kRefreshToken[] = …;
constexpr char kPrivateKey[] = …;
constexpr char kNewRefreshToken[] = …;
auto kBaseConfig = …;
auto kTestConfig = …;
auto kLegacyTestConfig = …;
void WriteTestFile(const base::FilePath& filename,
const base::Value::Dict& file_contents) { … }
}
class HostConfigTest : public ::testing::TestWithParam<base::Value::Dict*> { … };
TEST(HostConfigTest, InvalidFile) { … }
TEST_P(HostConfigTest, ReadConfigFromFile) { … }
TEST_P(HostConfigTest, WriteConfigToFile) { … }
INSTANTIATE_TEST_SUITE_P(…);
}