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

Side by Side Diff: remoting/host/policy_hack/policy_watcher_unittest.cc

Issue 10827265: Add Chromoting curtain-mode policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer feedback. Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/policy_hack/policy_watcher.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "remoting/host/constants.h" 9 #include "remoting/host/constants.h"
10 #include "remoting/host/policy_hack/fake_policy_watcher.h" 10 #include "remoting/host/policy_hack/fake_policy_watcher.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 base::DictionaryValue nat_false_domain_full_; 93 base::DictionaryValue nat_false_domain_full_;
94 base::DictionaryValue nat_true_domain_empty_others_default_; 94 base::DictionaryValue nat_true_domain_empty_others_default_;
95 95
96 private: 96 private:
97 void SetDefaults(base::DictionaryValue& dict) { 97 void SetDefaults(base::DictionaryValue& dict) {
98 dict.SetBoolean(PolicyWatcher::kNatPolicyName, true); 98 dict.SetBoolean(PolicyWatcher::kNatPolicyName, true);
99 dict.SetBoolean(PolicyWatcher::kHostRequireTwoFactorPolicyName, false); 99 dict.SetBoolean(PolicyWatcher::kHostRequireTwoFactorPolicyName, false);
100 dict.SetString(PolicyWatcher::kHostDomainPolicyName, ""); 100 dict.SetString(PolicyWatcher::kHostDomainPolicyName, "");
101 dict.SetString(PolicyWatcher::kHostTalkGadgetPrefixPolicyName, 101 dict.SetString(PolicyWatcher::kHostTalkGadgetPrefixPolicyName,
102 kDefaultTalkGadgetPrefix); 102 kDefaultTalkGadgetPrefix);
103 dict.SetBoolean(PolicyWatcher::kHostRequireCurtainPolicyName, false);
103 } 104 }
104 }; 105 };
105 106
106 const char* PolicyWatcherTest::kHostDomain = "google.com"; 107 const char* PolicyWatcherTest::kHostDomain = "google.com";
107 108
108 MATCHER_P(IsPolicies, dict, "") { 109 MATCHER_P(IsPolicies, dict, "") {
109 return arg->Equals(dict); 110 return arg->Equals(dict);
110 } 111 }
111 112
112 TEST_F(PolicyWatcherTest, None) { 113 TEST_F(PolicyWatcherTest, None) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 policy_watcher_->SetPolicies(&nat_true_domain_empty_); 247 policy_watcher_->SetPolicies(&nat_true_domain_empty_);
247 policy_watcher_->SetPolicies(&nat_true_domain_full_); 248 policy_watcher_->SetPolicies(&nat_true_domain_full_);
248 policy_watcher_->SetPolicies(&nat_false_domain_full_); 249 policy_watcher_->SetPolicies(&nat_false_domain_full_);
249 policy_watcher_->SetPolicies(&nat_false_domain_empty_); 250 policy_watcher_->SetPolicies(&nat_false_domain_empty_);
250 policy_watcher_->SetPolicies(&nat_true_domain_full_); 251 policy_watcher_->SetPolicies(&nat_true_domain_full_);
251 StopWatching(); 252 StopWatching();
252 } 253 }
253 254
254 } // namespace policy_hack 255 } // namespace policy_hack
255 } // namespace remoting 256 } // namespace remoting
OLDNEW
« 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