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

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

Issue 337053005: Precache policy-for-extensions for device-local accounts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed ios tests Created 6 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/schema_map_unittest.cc
diff --git a/components/policy/core/common/schema_map_unittest.cc b/components/policy/core/common/schema_map_unittest.cc
index 66da2f941ad25dec0851e53ae07325eb8e5dffd2..e0eb089ab7454c1cb907fb54be3b840d532e0848 100644
--- a/components/policy/core/common/schema_map_unittest.cc
+++ b/components/policy/core/common/schema_map_unittest.cc
@@ -240,14 +240,6 @@ TEST_F(SchemaMapTest, LegacyComponents) {
base::Value::CreateStringValue("value 1"),
NULL);
- // Known components without a schema are not filtered.
- PolicyNamespace without_schema_ns(POLICY_DOMAIN_EXTENSIONS, "without-schema");
- bundle.Get(without_schema_ns).Set("Schemaless",
- POLICY_LEVEL_MANDATORY,
- POLICY_SCOPE_USER,
- base::Value::CreateStringValue("value 2"),
- NULL);
-
// The Chrome namespace isn't filtered.
PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, "");
bundle.Get(chrome_ns).Set("ChromePolicy",
@@ -259,6 +251,14 @@ TEST_F(SchemaMapTest, LegacyComponents) {
PolicyBundle expected_bundle;
expected_bundle.MergeFrom(bundle);
+ // Known components without a schema are filtered out completely.
+ PolicyNamespace without_schema_ns(POLICY_DOMAIN_EXTENSIONS, "without-schema");
+ bundle.Get(without_schema_ns).Set("Schemaless",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ base::Value::CreateStringValue("value 2"),
+ NULL);
+
// Unknown policies of known components with a schema are removed.
bundle.Get(extension_ns).Set("Surprise",
POLICY_LEVEL_MANDATORY,

Powered by Google App Engine
This is Rietveld 408576698