Index: components/policy/core/common/policy_loader_win_unittest.cc |
diff --git a/components/policy/core/common/policy_loader_win_unittest.cc b/components/policy/core/common/policy_loader_win_unittest.cc |
index 52bd22410862d96b226919446c3d273261734929..c0afc4ecf33f6cd65ab662ff7c43f073bd434d35 100644 |
--- a/components/policy/core/common/policy_loader_win_unittest.cc |
+++ b/components/policy/core/common/policy_loader_win_unittest.cc |
@@ -34,7 +34,6 @@ |
#include "components/policy/core/common/external_data_fetcher.h" |
#include "components/policy/core/common/policy_bundle.h" |
#include "components/policy/core/common/policy_map.h" |
-#include "components/policy/core/common/policy_types.h" |
#include "components/policy/core/common/preg_parser_win.h" |
#include "components/policy/core/common/schema_map.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -334,10 +333,7 @@ |
} |
RegistryTestHarness::RegistryTestHarness(HKEY hive, PolicyScope scope) |
- : PolicyProviderTestHarness(POLICY_LEVEL_MANDATORY, scope, |
- POLICY_SOURCE_PLATFORM), |
- hive_(hive) { |
-} |
+ : PolicyProviderTestHarness(POLICY_LEVEL_MANDATORY, scope), hive_(hive) {} |
RegistryTestHarness::~RegistryTestHarness() {} |
@@ -459,9 +455,7 @@ |
} |
PRegTestHarness::PRegTestHarness() |
- : PolicyProviderTestHarness(POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
- POLICY_SOURCE_PLATFORM) { |
-} |
+ : PolicyProviderTestHarness(POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE) {} |
PRegTestHarness::~PRegTestHarness() {} |
@@ -764,8 +758,7 @@ |
expected_policy.SetString(test_keys::kKeyString, "registry"); |
PolicyBundle expected; |
expected.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) |
- .LoadFrom(&expected_policy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
- POLICY_SOURCE_PLATFORM); |
+ .LoadFrom(&expected_policy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); |
return Matches(expected); |
} |
@@ -781,7 +774,7 @@ |
PolicyBundle expected; |
expected.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) |
.LoadFrom(&expected_policy, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); |
+ POLICY_SCOPE_MACHINE); |
return Matches(expected); |
} |
@@ -810,7 +803,6 @@ |
.Set(test_keys::kKeyString, |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_MACHINE, |
- POLICY_SOURCE_PLATFORM, |
new base::StringValue("hklm"), |
NULL); |
EXPECT_TRUE(Matches(expected)); |
@@ -865,25 +857,21 @@ |
expected_policy.Set("a", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_MACHINE, |
- POLICY_SOURCE_PLATFORM, |
new base::StringValue(kMachineMandatory), |
NULL); |
expected_policy.Set("b", |
POLICY_LEVEL_MANDATORY, |
POLICY_SCOPE_USER, |
- POLICY_SOURCE_PLATFORM, |
new base::StringValue(kUserMandatory), |
NULL); |
expected_policy.Set("c", |
POLICY_LEVEL_RECOMMENDED, |
POLICY_SCOPE_MACHINE, |
- POLICY_SOURCE_PLATFORM, |
new base::StringValue(kMachineRecommended), |
NULL); |
expected_policy.Set("d", |
POLICY_LEVEL_RECOMMENDED, |
POLICY_SCOPE_USER, |
- POLICY_SOURCE_PLATFORM, |
new base::StringValue(kUserRecommended), |
NULL); |
EXPECT_TRUE(Matches(expected)); |
@@ -942,8 +930,7 @@ |
InstallValue(encoded_policy, HKEY_CURRENT_USER, kPathSuffix, kMandatory)); |
PolicyBundle expected; |
- expected.Get(ns).LoadFrom(&policy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
- POLICY_SOURCE_PLATFORM); |
+ expected.Get(ns).LoadFrom(&policy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); |
EXPECT_TRUE(Matches(expected)); |
} |
@@ -975,8 +962,7 @@ |
policy.SetInteger("int", 123); |
policy.SetDouble("double", 456.0); |
PolicyBundle expected; |
- expected.Get(ns).LoadFrom(&policy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, |
- POLICY_SOURCE_PLATFORM); |
+ expected.Get(ns).LoadFrom(&policy, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); |
EXPECT_TRUE(Matches(expected)); |
} |
@@ -1026,8 +1012,8 @@ |
base::DictionaryValue expected_policies; |
expected_policies.Set("policy", expected_policy.DeepCopy()); |
PolicyBundle expected; |
- expected.Get(ns).LoadFrom(&expected_policies, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_USER, POLICY_SOURCE_PLATFORM); |
+ expected.Get(ns).LoadFrom( |
+ &expected_policies, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); |
EXPECT_TRUE(Matches(expected)); |
} |
@@ -1192,12 +1178,12 @@ |
base::DictionaryValue expected_a; |
expected_a.SetInteger("policy 1", 3); |
expected_a.SetInteger("policy 2", 3); |
- expected.Get(ns_a).LoadFrom(&expected_a, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); |
+ expected.Get(ns_a).LoadFrom( |
+ &expected_a, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); |
base::DictionaryValue expected_b; |
expected_b.SetInteger("policy 1", 2); |
- expected.Get(ns_b).LoadFrom(&expected_b, POLICY_LEVEL_MANDATORY, |
- POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM); |
+ expected.Get(ns_b).LoadFrom( |
+ &expected_b, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE); |
EXPECT_TRUE(Matches(expected)); |
} |
@@ -1233,10 +1219,9 @@ |
PolicyMap& expected_policy = expected.Get(ns); |
expected_policy.Set("alternative_browser_path", |
POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
- POLICY_SOURCE_PLATFORM, |
new base::StringValue("c:\\legacy\\browser.exe"), NULL); |
expected_policy.Set("url_list", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
- POLICY_SOURCE_PLATFORM, list.DeepCopy(), nullptr); |
+ list.DeepCopy(), NULL); |
EXPECT_TRUE(Matches(expected)); |
} |