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

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

Issue 268483003: Revert 267234 "New policies: enable/disable relay; port range" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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
Index: trunk/src/remoting/host/policy_hack/policy_watcher_unittest.cc
===================================================================
--- trunk/src/remoting/host/policy_hack/policy_watcher_unittest.cc (revision 267240)
+++ trunk/src/remoting/host/policy_hack/policy_watcher_unittest.cc (working copy)
@@ -75,13 +75,6 @@
true);
gnubby_auth_false_.SetBoolean(PolicyWatcher::kHostAllowGnubbyAuthPolicyName,
false);
- relay_true_.SetBoolean(PolicyWatcher::kRelayPolicyName, true);
- relay_false_.SetBoolean(PolicyWatcher::kRelayPolicyName, false);
- port_range_full_.SetString(PolicyWatcher::kUdpPortRangePolicyName,
- kPortRange);
- port_range_empty_.SetString(PolicyWatcher::kUdpPortRangePolicyName,
- std::string());
-
#if !defined(NDEBUG)
SetDefaults(nat_false_overridden_others_default_);
nat_false_overridden_others_default_.SetBoolean(
@@ -106,7 +99,6 @@
}
static const char* kHostDomain;
- static const char* kPortRange;
base::MessageLoop message_loop_;
scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
MockPolicyCallback mock_policy_callback_;
@@ -134,16 +126,10 @@
base::DictionaryValue pairing_false_;
base::DictionaryValue gnubby_auth_true_;
base::DictionaryValue gnubby_auth_false_;
- base::DictionaryValue relay_true_;
- base::DictionaryValue relay_false_;
- base::DictionaryValue port_range_full_;
- base::DictionaryValue port_range_empty_;
private:
void SetDefaults(base::DictionaryValue& dict) {
dict.SetBoolean(PolicyWatcher::kNatPolicyName, true);
- dict.SetBoolean(PolicyWatcher::kRelayPolicyName, true);
- dict.SetString(PolicyWatcher::kUdpPortRangePolicyName, "");
dict.SetBoolean(PolicyWatcher::kHostRequireTwoFactorPolicyName, false);
dict.SetString(PolicyWatcher::kHostDomainPolicyName, std::string());
dict.SetBoolean(PolicyWatcher::kHostMatchUsernamePolicyName, false);
@@ -164,7 +150,6 @@
};
const char* PolicyWatcherTest::kHostDomain = "google.com";
-const char* PolicyWatcherTest::kPortRange = "12400-12409";
MATCHER_P(IsPolicies, dict, "") {
return arg->Equals(dict);
@@ -370,37 +355,5 @@
StopWatching();
}
-TEST_F(PolicyWatcherTest, Relay) {
- testing::InSequence sequence;
- EXPECT_CALL(mock_policy_callback_,
- OnPolicyUpdatePtr(IsPolicies(&nat_true_others_default_)));
- EXPECT_CALL(mock_policy_callback_,
- OnPolicyUpdatePtr(IsPolicies(&relay_false_)));
- EXPECT_CALL(mock_policy_callback_,
- OnPolicyUpdatePtr(IsPolicies(&relay_true_)));
-
- StartWatching();
- policy_watcher_->SetPolicies(&empty_);
- policy_watcher_->SetPolicies(&relay_false_);
- policy_watcher_->SetPolicies(&relay_true_);
- StopWatching();
-}
-
-TEST_F(PolicyWatcherTest, UdpPortRange) {
- testing::InSequence sequence;
- EXPECT_CALL(mock_policy_callback_,
- OnPolicyUpdatePtr(IsPolicies(&nat_true_others_default_)));
- EXPECT_CALL(mock_policy_callback_,
- OnPolicyUpdatePtr(IsPolicies(&port_range_full_)));
- EXPECT_CALL(mock_policy_callback_,
- OnPolicyUpdatePtr(IsPolicies(&port_range_empty_)));
-
- StartWatching();
- policy_watcher_->SetPolicies(&empty_);
- policy_watcher_->SetPolicies(&port_range_full_);
- policy_watcher_->SetPolicies(&port_range_empty_);
- StopWatching();
-}
-
} // namespace policy_hack
} // namespace remoting
« no previous file with comments | « trunk/src/remoting/host/policy_hack/policy_watcher.cc ('k') | trunk/src/remoting/host/remoting_me2me_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698