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

Side by Side Diff: chrome_frame/test/policy_settings_unittest.cc

Issue 6002015: Policy: generate boilerplate policy type and constant code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge with ToT Created 9 years, 11 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 | « chrome_frame/policy_settings.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) 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/at_exit.h" 6 #include "base/at_exit.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "base/win/registry.h" 11 #include "base/win/registry.h"
12 #include "chrome/common/policy_constants.h"
13 #include "chrome_frame/policy_settings.h" 12 #include "chrome_frame/policy_settings.h"
14 #include "chrome_frame/test/chrome_frame_test_utils.h" 13 #include "chrome_frame/test/chrome_frame_test_utils.h"
14 #include "policy/policy_constants.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 using base::win::RegKey; 17 using base::win::RegKey;
18 using chrome_frame_test::ScopedVirtualizeHklmAndHkcu; 18 using chrome_frame_test::ScopedVirtualizeHklmAndHkcu;
19 using chrome_frame_test::TempRegKeyOverride; 19 using chrome_frame_test::TempRegKeyOverride;
20 20
21 namespace { 21 namespace {
22 22
23 // A best effort way to zap CF policy entries that may be in the registry. 23 // A best effort way to zap CF policy entries that may be in the registry.
24 void DeleteChromeFramePolicyEntries(HKEY root) { 24 void DeleteChromeFramePolicyEntries(HKEY root) {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 HKEY root[] = { HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER }; 208 HKEY root[] = { HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER };
209 for (int i = 0; i < arraysize(root); ++i) { 209 for (int i = 0; i < arraysize(root); ++i) {
210 SetChromeApplicationLocale(root[i], kTestApplicationLocale); 210 SetChromeApplicationLocale(root[i], kTestApplicationLocale);
211 ResetPolicySettings(); 211 ResetPolicySettings();
212 EXPECT_EQ(std::wstring(kTestApplicationLocale), 212 EXPECT_EQ(std::wstring(kTestApplicationLocale),
213 PolicySettings::GetInstance()->ApplicationLocale()); 213 PolicySettings::GetInstance()->ApplicationLocale());
214 214
215 DeleteChromeFramePolicyEntries(root[i]); 215 DeleteChromeFramePolicyEntries(root[i]);
216 } 216 }
217 } 217 }
OLDNEW
« no previous file with comments | « chrome_frame/policy_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698