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

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

Issue 4062002: Dynamic policy refresh support for the Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/map/list/, nits. Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <gtest/gtest.h> 5 #include <gtest/gtest.h>
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 temp_hklm_hive_key_.Create(HKEY_CURRENT_USER, 176 temp_hklm_hive_key_.Create(HKEY_CURRENT_USER,
177 kUnitTestMachineOverrideSubKey, 177 kUnitTestMachineOverrideSubKey,
178 KEY_ALL_ACCESS); 178 KEY_ALL_ACCESS);
179 temp_hkcu_hive_key_.Create(HKEY_CURRENT_USER, 179 temp_hkcu_hive_key_.Create(HKEY_CURRENT_USER,
180 kUnitTestUserOverrideSubKey, 180 kUnitTestUserOverrideSubKey,
181 KEY_ALL_ACCESS); 181 KEY_ALL_ACCESS);
182 182
183 ActivateOverrides(); 183 ActivateOverrides();
184 184
185 store_.reset(new MockConfigurationPolicyStore); 185 store_.reset(new MockConfigurationPolicyStore);
186 provider_.reset( 186 provider_.reset(new ConfigurationPolicyProviderWin(
187 new ConfigurationPolicyProviderWin( 187 ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList()));
188 ConfigurationPolicyPrefStore::GetChromePolicyValueMap()));
189 } 188 }
190 189
191 void ConfigurationPolicyProviderWinTest::TearDown() { 190 void ConfigurationPolicyProviderWinTest::TearDown() {
192 DeactivateOverrides(); 191 DeactivateOverrides();
193 DeleteRegistrySandbox(); 192 DeleteRegistrySandbox();
194 } 193 }
195 194
196 void ConfigurationPolicyProviderWinTest::ActivateOverrides() { 195 void ConfigurationPolicyProviderWinTest::ActivateOverrides() {
197 HRESULT result = RegOverridePredefKey(HKEY_LOCAL_MACHINE, 196 HRESULT result = RegOverridePredefKey(HKEY_LOCAL_MACHINE,
198 temp_hklm_hive_key_.Handle()); 197 temp_hklm_hive_key_.Handle());
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 ConfigurationPolicyStore::kPolicyExtensionInstallDenyList, 419 ConfigurationPolicyStore::kPolicyExtensionInstallDenyList,
421 key::kExtensionInstallDenyList), 420 key::kExtensionInstallDenyList),
422 PolicyTestParams::ForBooleanPolicy( 421 PolicyTestParams::ForBooleanPolicy(
423 ConfigurationPolicyStore::kPolicyShowHomeButton, 422 ConfigurationPolicyStore::kPolicyShowHomeButton,
424 key::kShowHomeButton), 423 key::kShowHomeButton),
425 PolicyTestParams::ForBooleanPolicy( 424 PolicyTestParams::ForBooleanPolicy(
426 ConfigurationPolicyStore::kPolicyPrintingEnabled, 425 ConfigurationPolicyStore::kPolicyPrintingEnabled,
427 key::kPrintingEnabled))); 426 key::kPrintingEnabled)));
428 427
429 } // namespace policy 428 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698