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

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

Issue 78763002: Move PolicyMap and its dependencies to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export nested struct Created 7 years 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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/prefs/pref_value_map.h" 7 #include "base/prefs/pref_value_map.h"
8 #include "chrome/browser/policy/configuration_policy_handler.h" 8 #include "chrome/browser/policy/configuration_policy_handler.h"
9 #include "chrome/browser/policy/external_data_fetcher.h"
10 #include "chrome/browser/policy/policy_error_map.h" 9 #include "chrome/browser/policy/policy_error_map.h"
11 #include "chrome/browser/policy/policy_map.h" 10 #include "components/policy/core/common/policy_map.h"
12 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
13 12
14 namespace policy { 13 namespace policy {
15 14
16 namespace { 15 namespace {
17 16
18 StringToIntEnumListPolicyHandler::MappingEntry kTestTypeMap[] = { 17 StringToIntEnumListPolicyHandler::MappingEntry kTestTypeMap[] = {
19 { "one", 1 }, 18 { "one", 1 },
20 { "two", 2 }, 19 { "two", 2 },
21 }; 20 };
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY, 477 policy_map.Set(kTestPolicy, POLICY_LEVEL_MANDATORY,
479 POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL); 478 POLICY_SCOPE_USER, base::Value::CreateIntegerValue(10), NULL);
480 prefs.Clear(); 479 prefs.Clear();
481 handler.ApplyPolicySettings(policy_map, &prefs); 480 handler.ApplyPolicySettings(policy_map, &prefs);
482 expected.reset(base::Value::CreateDoubleValue(0.1)); 481 expected.reset(base::Value::CreateDoubleValue(0.1));
483 EXPECT_TRUE(prefs.GetValue(kTestPref, &value)); 482 EXPECT_TRUE(prefs.GetValue(kTestPref, &value));
484 EXPECT_TRUE(base::Value::Equals(expected.get(), value)); 483 EXPECT_TRUE(base::Value::Equals(expected.get(), value));
485 } 484 }
486 485
487 } // namespace policy 486 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698