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

Side by Side Diff: chrome/browser/policy/cloud_policy_provider_unittest.cc

Issue 10545033: Removed the PolicyDefinitionList from the ConfigurationPolicyProvider interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 6 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
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 "chrome/browser/policy/cloud_policy_provider.h" 5 #include "chrome/browser/policy/cloud_policy_provider.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/policy/browser_policy_connector.h" 9 #include "chrome/browser/policy/browser_policy_connector.h"
10 #include "chrome/browser/policy/cloud_policy_cache_base.h" 10 #include "chrome/browser/policy/cloud_policy_cache_base.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 using CloudPolicyCacheBase::NotifyObservers; 52 using CloudPolicyCacheBase::NotifyObservers;
53 53
54 private: 54 private:
55 DISALLOW_COPY_AND_ASSIGN(MockCloudPolicyCache); 55 DISALLOW_COPY_AND_ASSIGN(MockCloudPolicyCache);
56 }; 56 };
57 57
58 class CloudPolicyProviderTest : public testing::Test { 58 class CloudPolicyProviderTest : public testing::Test {
59 protected: 59 protected:
60 CloudPolicyProviderTest() 60 CloudPolicyProviderTest()
61 : cloud_policy_provider_(&browser_policy_connector_, 61 : cloud_policy_provider_(&browser_policy_connector_,
62 GetChromePolicyDefinitionList(),
63 POLICY_LEVEL_MANDATORY) {} 62 POLICY_LEVEL_MANDATORY) {}
64 63
65 void SetUp() OVERRIDE { 64 void SetUp() OVERRIDE {
66 registrar_.Init(&cloud_policy_provider_, &observer_); 65 registrar_.Init(&cloud_policy_provider_, &observer_);
67 } 66 }
68 67
69 void AddUserCache() { 68 void AddUserCache() {
70 EXPECT_CALL(observer_, OnUpdatePolicy(&cloud_policy_provider_)); 69 EXPECT_CALL(observer_, OnUpdatePolicy(&cloud_policy_provider_));
71 cloud_policy_provider_.SetUserPolicyCache(&user_policy_cache_); 70 cloud_policy_provider_.SetUserPolicyCache(&user_policy_cache_);
72 Mock::VerifyAndClearExpectations(&observer_); 71 Mock::VerifyAndClearExpectations(&observer_);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 base::DictionaryValue* proxy_settings = new base::DictionaryValue(); 208 base::DictionaryValue* proxy_settings = new base::DictionaryValue();
210 proxy_settings->SetString(key::kProxyMode, "user mode"); 209 proxy_settings->SetString(key::kProxyMode, "user mode");
211 expected_bundle.Get(POLICY_DOMAIN_CHROME, "") 210 expected_bundle.Get(POLICY_DOMAIN_CHROME, "")
212 .Set(key::kProxySettings, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 211 .Set(key::kProxySettings, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
213 proxy_settings); 212 proxy_settings);
214 EXPECT_TRUE(cloud_policy_provider_.policies().Equals(expected_bundle)); 213 EXPECT_TRUE(cloud_policy_provider_.policies().Equals(expected_bundle));
215 } 214 }
216 #endif 215 #endif
217 216
218 } // namespace policy 217 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud_policy_provider.cc ('k') | chrome/browser/policy/config_dir_policy_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698