| Index: remoting/host/policy_watcher_unittest.cc
|
| diff --git a/remoting/host/policy_watcher_unittest.cc b/remoting/host/policy_watcher_unittest.cc
|
| index ccbdf6d8f46dc993d2bcc1188270a4120a3ebea2..a8e41bba2fba696a74dfe9e25ae1fc2b4ed0554f 100644
|
| --- a/remoting/host/policy_watcher_unittest.cc
|
| +++ b/remoting/host/policy_watcher_unittest.cc
|
| @@ -245,7 +245,6 @@ class PolicyWatcherTest : public testing::Test {
|
| base::DictionaryValue remote_assistance_uiaccess_true_;
|
| base::DictionaryValue remote_assistance_uiaccess_false_;
|
|
|
| - private:
|
| void SetDefaults(base::DictionaryValue& dict) {
|
| dict.SetBoolean(key::kRemoteAccessHostFirewallTraversal, true);
|
| dict.SetBoolean(key::kRemoteAccessHostAllowRelayedConnection, true);
|
| @@ -684,4 +683,23 @@ TEST_F(PolicyWatcherTest, SchemaTypeCheck) {
|
| EXPECT_EQ(boolean_schema.type(), base::Value::Type::BOOLEAN);
|
| }
|
|
|
| +TEST_F(PolicyWatcherTest, GetCurrentPolicies) {
|
| + base::DictionaryValue dummy_domain, dummy_domain_plus_defaults;
|
| + dummy_domain.SetString(key::kRemoteAccessHostDomain, "dummy");
|
| + SetDefaults(dummy_domain_plus_defaults);
|
| + dummy_domain_plus_defaults.SetString(key::kRemoteAccessHostDomain, "dummy");
|
| +
|
| + testing::InSequence sequence;
|
| + EXPECT_CALL(mock_policy_callback_,
|
| + OnPolicyUpdatePtr(IsPolicies(&nat_true_others_default_)));
|
| + EXPECT_CALL(mock_policy_callback_,
|
| + OnPolicyUpdatePtr(IsPolicies(&dummy_domain)));
|
| +
|
| + StartWatching();
|
| + SetPolicies(dummy_domain);
|
| + std::unique_ptr<base::DictionaryValue> current_policies =
|
| + policy_watcher_->GetCurrentPolicies();
|
| + ASSERT_TRUE(*current_policies == dummy_domain_plus_defaults);
|
| +}
|
| +
|
| } // namespace remoting
|
|
|