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

Unified Diff: remoting/host/policy_hack/policy_watcher_unittest.cc

Issue 10837022: [Chromoting] Add names of host policies for requiring 2-factor auth, and for the talkgadget name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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_hack/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_hack/policy_watcher_unittest.cc
diff --git a/remoting/host/policy_hack/policy_watcher_unittest.cc b/remoting/host/policy_hack/policy_watcher_unittest.cc
index 73f4c7d9aecb35cbf80380887aa7721b53b3b50e..898ab0af68a4173485616ca246e0ce98baae7d78 100644
--- a/remoting/host/policy_hack/policy_watcher_unittest.cc
+++ b/remoting/host/policy_hack/policy_watcher_unittest.cc
@@ -50,6 +50,11 @@ class PolicyWatcherTest : public testing::Test {
nat_false_domain_full_.SetBoolean(PolicyWatcher::kNatPolicyName, false);
nat_false_domain_full_.SetString(PolicyWatcher::kHostDomainPolicyName,
kHostDomain);
+ SetDefaults(nat_true_domain_empty_others_default_);
+ nat_true_domain_empty_others_default_.SetBoolean(
+ PolicyWatcher::kNatPolicyName, true);
+ nat_true_domain_empty_others_default_.SetString(
+ PolicyWatcher::kHostDomainPolicyName, "");
}
protected:
@@ -85,11 +90,14 @@ class PolicyWatcherTest : public testing::Test {
base::DictionaryValue nat_true_domain_full_;
base::DictionaryValue nat_false_domain_empty_;
base::DictionaryValue nat_false_domain_full_;
+ base::DictionaryValue nat_true_domain_empty_others_default_;
private:
void SetDefaults(base::DictionaryValue& dict) {
dict.SetBoolean(PolicyWatcher::kNatPolicyName, true);
+ dict.SetBoolean(PolicyWatcher::kRequireTwoFactorPolicyName, false);
dict.SetString(PolicyWatcher::kHostDomainPolicyName, "");
+ dict.SetString(PolicyWatcher::kTalkGadgetPolicyName, "chromoting");
}
};
@@ -221,7 +229,8 @@ TEST_F(PolicyWatcherTest, NatNoneThenFalseThenTrue) {
TEST_F(PolicyWatcherTest, ChangeOneRepeatedlyThenTwo) {
testing::InSequence sequence;
EXPECT_CALL(mock_policy_callback_,
- OnPolicyUpdatePtr(IsPolicies(&nat_true_domain_empty_)));
+ OnPolicyUpdatePtr(IsPolicies(
+ &nat_true_domain_empty_others_default_)));
EXPECT_CALL(mock_policy_callback_,
OnPolicyUpdatePtr(IsPolicies(&domain_full_)));
EXPECT_CALL(mock_policy_callback_,
« no previous file with comments | « remoting/host/policy_hack/policy_watcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698