Index: remoting/host/policy_watcher_unittest.cc |
diff --git a/remoting/host/policy_watcher_unittest.cc b/remoting/host/policy_watcher_unittest.cc |
index 4b70a6ad5b09acadae868a5b1512677c136c8e2b..61c2a15329b74d08b46956b5fb61b7d038fb993e 100644 |
--- a/remoting/host/policy_watcher_unittest.cc |
+++ b/remoting/host/policy_watcher_unittest.cc |
@@ -239,6 +239,7 @@ class PolicyWatcherTest : public testing::Test { |
return policy_watcher_->GetPolicySchema(); |
} |
+ // TODO(jamiewalch): Update this to use PolicyWatcher::GetDefaultValues() |
const base::DictionaryValue& GetDefaultValues() { |
return *(policy_watcher_->default_values_); |
} |
@@ -300,7 +301,6 @@ class PolicyWatcherTest : public testing::Test { |
base::DictionaryValue deprecated_and_new_policies_expected_; |
base::DictionaryValue deprecated_empty_strings_; |
- private: |
rkjnsn
2017/05/03 21:31:47
Is this change related? It doesn't look like you u
Jamie
2017/05/03 23:41:10
You're right; I was using it in an earlier iterati
|
void SetDefaults(base::DictionaryValue& dict) { |
dict.SetBoolean(key::kRemoteAccessHostFirewallTraversal, true); |
dict.SetBoolean(key::kRemoteAccessHostAllowRelayedConnection, true); |
@@ -769,4 +769,18 @@ TEST_F(PolicyWatcherTest, DeprecatedEmpty) { |
StartWatching(); |
} |
+TEST_F(PolicyWatcherTest, GetCurrentPolicies) { |
+ testing::InSequence sequence; |
+ EXPECT_CALL(mock_policy_callback_, |
+ OnPolicyUpdatePtr(IsPolicies(&nat_true_others_default_))); |
+ EXPECT_CALL(mock_policy_callback_, |
+ OnPolicyUpdatePtr(IsPolicies(&nat_false_))); |
+ |
+ StartWatching(); |
+ SetPolicies(nat_false_); |
+ std::unique_ptr<base::DictionaryValue> current_policies = |
+ policy_watcher_->GetCurrentPolicies(); |
+ ASSERT_TRUE(*current_policies == nat_false_others_default_); |
+} |
+ |
} // namespace remoting |