| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |