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

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

Issue 16254003: WIP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 <string> 5 #include <string>
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/prefs/pref_store_observer_mock.h" 10 #include "base/prefs/pref_store_observer_mock.h"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "chrome/browser/policy/configuration_policy_handler.h" 12 #include "chrome/browser/policy/configuration_policy_handler.h"
13 #include "chrome/browser/policy/configuration_policy_pref_store.h" 13 #include "chrome/browser/policy/configuration_policy_pref_store.h"
14 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 14 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
15 #include "chrome/browser/policy/policy_map.h" 15 #include "chrome/browser/policy/policy_map.h"
16 #include "chrome/browser/policy/policy_namespace.h"
16 #include "chrome/browser/policy/policy_service_impl.h" 17 #include "chrome/browser/policy/policy_service_impl.h"
17 #include "chrome/browser/prefs/incognito_mode_prefs.h" 18 #include "chrome/browser/prefs/incognito_mode_prefs.h"
18 #include "chrome/browser/prefs/proxy_config_dictionary.h" 19 #include "chrome/browser/prefs/proxy_config_dictionary.h"
19 #include "chrome/common/content_settings.h" 20 #include "chrome/common/content_settings.h"
20 #include "chrome/common/pref_names.h" 21 #include "chrome/common/pref_names.h"
21 #include "policy/policy_constants.h" 22 #include "policy/policy_constants.h"
22 #include "testing/gmock/include/gmock/gmock.h" 23 #include "testing/gmock/include/gmock/gmock.h"
23 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
24 25
25 using testing::Mock; 26 using testing::Mock;
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY, 1074 policy.Set(key::kDefaultJavaScriptSetting, POLICY_LEVEL_MANDATORY,
1074 POLICY_SCOPE_USER, 1075 POLICY_SCOPE_USER,
1075 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); 1076 base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
1076 UpdateProviderPolicy(policy); 1077 UpdateProviderPolicy(policy);
1077 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting, 1078 EXPECT_TRUE(store_->GetValue(prefs::kManagedDefaultJavaScriptSetting,
1078 &value)); 1079 &value));
1079 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value)); 1080 EXPECT_TRUE(base::FundamentalValue(CONTENT_SETTING_ALLOW).Equals(value));
1080 } 1081 }
1081 1082
1082 } // namespace policy 1083 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_pref_store.cc ('k') | chrome/browser/policy/configuration_policy_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698