#include "remoting/host/session_policies_from_dict.h"
#include <optional>
#include "base/no_destructor.h"
#include "base/time/time.h"
#include "base/values.h"
#include "components/policy/policy_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace remoting {
namespace {
const SessionPolicies kFullSessionPolicies = …;
const base::Value::Dict& GetFullSessionPolicyDict() { … }
#if !BUILDFLAG(IS_CHROMEOS)
base::Value::Dict GetPolicyDictWithMaxDurationMins(int mins) { … }
#endif
base::Value::Dict GetPolicyDictWithClipboardSize(int clipboard_size) { … }
}
TEST(SessionPoliciesFromDict, EmptyDict_CreatesEmptyPolicies) { … }
TEST(SessionPoliciesFromDict, FullDict_CreatesFullPolicies) { … }
TEST(SessionPoliciesFromDict, PartialDict_CreatesPartialPolicies) { … }
TEST(SessionPoliciesFromDict,
FirewallTraversalDisabled_DisablesStunAndRelayedConnections) { … }
#if !BUILDFLAG(IS_CHROMEOS)
TEST(SessionPoliciesFromDict, InvalidMaxSessionDuration_ReturnsNullopt) { … }
#endif
#if !BUILDFLAG(IS_CHROMEOS)
TEST(SessionPoliciesFromDict, ZeroMaxSessionDuration_FieldIsNullopt) { … }
#endif
TEST(SessionPoliciesFromDict, InvalidHostUdpPortRange_ReturnsNullopt) { … }
TEST(SessionPoliciesFromDict, NegativeClipboardSize_FieldIsNullopt) { … }
TEST(SessionPoliciesFromDict, ZeroClipboardSize_FieldIsZero) { … }
}