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

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

Issue 6313008: Implement pref policy for disabling incognito mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_path.h" 5 #include "base/file_path.h"
6 #include "chrome/browser/policy/configuration_policy_pref_store.h" 6 #include "chrome/browser/policy/configuration_policy_pref_store.h"
7 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 7 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
8 #include "chrome/browser/prefs/proxy_prefs.h" 8 #include "chrome/browser/prefs/proxy_prefs.h"
9 #include "chrome/common/notification_service.h" 9 #include "chrome/common/notification_service.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 #include "chrome/common/pref_store_observer_mock.h" 11 #include "chrome/common/pref_store_observer_mock.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 TypeAndName(kPolicyPasswordManagerEnabled, 168 TypeAndName(kPolicyPasswordManagerEnabled,
169 prefs::kPasswordManagerEnabled), 169 prefs::kPasswordManagerEnabled),
170 TypeAndName(kPolicyPasswordManagerAllowShowPasswords, 170 TypeAndName(kPolicyPasswordManagerAllowShowPasswords,
171 prefs::kPasswordManagerAllowShowPasswords), 171 prefs::kPasswordManagerAllowShowPasswords),
172 TypeAndName(kPolicyShowHomeButton, 172 TypeAndName(kPolicyShowHomeButton,
173 prefs::kShowHomeButton), 173 prefs::kShowHomeButton),
174 TypeAndName(kPolicyPrintingEnabled, 174 TypeAndName(kPolicyPrintingEnabled,
175 prefs::kPrintingEnabled), 175 prefs::kPrintingEnabled),
176 TypeAndName(kPolicyJavascriptEnabled, 176 TypeAndName(kPolicyJavascriptEnabled,
177 prefs::kWebKitJavascriptEnabled), 177 prefs::kWebKitJavascriptEnabled),
178 TypeAndName(kPolicyIncognitoEnabled,
179 prefs::kIncognitoEnabled),
178 TypeAndName(kPolicySavingBrowserHistoryDisabled, 180 TypeAndName(kPolicySavingBrowserHistoryDisabled,
179 prefs::kSavingBrowserHistoryDisabled), 181 prefs::kSavingBrowserHistoryDisabled),
180 TypeAndName(kPolicySavingBrowserHistoryDisabled, 182 TypeAndName(kPolicySavingBrowserHistoryDisabled,
181 prefs::kSavingBrowserHistoryDisabled), 183 prefs::kSavingBrowserHistoryDisabled),
182 TypeAndName(kPolicyDisableAuthNegotiateCnameLookup, 184 TypeAndName(kPolicyDisableAuthNegotiateCnameLookup,
183 prefs::kDisableAuthNegotiateCnameLookup), 185 prefs::kDisableAuthNegotiateCnameLookup),
184 TypeAndName(kPolicyEnableAuthNegotiatePort, 186 TypeAndName(kPolicyEnableAuthNegotiatePort,
185 prefs::kEnableAuthNegotiatePort), 187 prefs::kEnableAuthNegotiatePort),
186 TypeAndName(kPolicyDisable3DAPIs, 188 TypeAndName(kPolicyDisable3DAPIs,
187 prefs::kDisable3DAPIs))); 189 prefs::kDisable3DAPIs)));
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 684
683 provider_.SetInitializationComplete(true); 685 provider_.SetInitializationComplete(true);
684 EXPECT_FALSE(store_.IsInitializationComplete()); 686 EXPECT_FALSE(store_.IsInitializationComplete());
685 687
686 store_.OnUpdatePolicy(); 688 store_.OnUpdatePolicy();
687 Mock::VerifyAndClearExpectations(&observer_); 689 Mock::VerifyAndClearExpectations(&observer_);
688 EXPECT_TRUE(store_.IsInitializationComplete()); 690 EXPECT_TRUE(store_.IsInitializationComplete());
689 } 691 }
690 692
691 } // namespace policy 693 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698