Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1544)

Unified Diff: remoting/host/policy_watcher_unittest.cc

Issue 2847853003: Remove policy watching from It2MeHost. (Closed)
Patch Set: Add dep. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/policy_watcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3447f56920edc130c65add4286e8463e6e2ba99e 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_);
}
@@ -769,4 +770,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
« no previous file with comments | « remoting/host/policy_watcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698