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

Unified Diff: components/policy/core/common/policy_loader_win_unittest.cc

Issue 1350913006: Revert of Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/policy/core/common/policy_loader_win.cc ('k') | components/policy/core/common/policy_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « components/policy/core/common/policy_loader_win.cc ('k') | components/policy/core/common/policy_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698