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

Side by Side Diff: chrome/browser/extensions/policy_handlers_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/prefs/pref_value_map.h"
7 #include "chrome/browser/extensions/external_policy_loader.h" 6 #include "chrome/browser/extensions/external_policy_loader.h"
8 #include "chrome/browser/extensions/policy_handlers.h" 7 #include "chrome/browser/extensions/policy_handlers.h"
9 #include "components/policy/core/browser/policy_error_map.h" 8 #include "components/policy/core/browser/policy_error_map.h"
10 #include "components/policy/core/common/policy_map.h" 9 #include "components/policy/core/common/policy_map.h"
11 #include "components/policy/core/common/policy_types.h" 10 #include "components/policy/core/common/policy_types.h"
12 #include "components/policy/core/common/schema.h" 11 #include "components/policy/core/common/schema.h"
12 #include "components/prefs/pref_value_map.h"
13 #include "extensions/browser/pref_names.h" 13 #include "extensions/browser/pref_names.h"
14 #include "policy/policy_constants.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 namespace extensions { 17 namespace extensions {
18 18
19 const char kTestPref[] = "unit_test.test_pref"; 19 const char kTestPref[] = "unit_test.test_pref";
20 const char kTestManagementPolicy1[] = 20 const char kTestManagementPolicy1[] =
21 "{" 21 "{"
22 " \"abcdefghijklmnopabcdefghijklmnop\": {" 22 " \"abcdefghijklmnopabcdefghijklmnop\": {"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 policy_value->DeepCopy(), 364 policy_value->DeepCopy(),
365 NULL); 365 NULL);
366 EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors)); 366 EXPECT_TRUE(handler.CheckPolicySettings(policy_map, &errors));
367 handler.ApplyPolicySettings(policy_map, &prefs); 367 handler.ApplyPolicySettings(policy_map, &prefs);
368 base::Value* value = NULL; 368 base::Value* value = NULL;
369 ASSERT_TRUE(prefs.GetValue(pref_names::kExtensionManagement, &value)); 369 ASSERT_TRUE(prefs.GetValue(pref_names::kExtensionManagement, &value));
370 EXPECT_TRUE(base::Value::Equals(policy_value.get(), value)); 370 EXPECT_TRUE(base::Value::Equals(policy_value.get(), value));
371 } 371 }
372 372
373 } // namespace extensions 373 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/policy_handlers.cc ('k') | chrome/browser/extensions/test_extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698