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

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

Issue 1348903007: 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
Index: components/policy/core/common/policy_bundle_unittest.cc
diff --git a/components/policy/core/common/policy_bundle_unittest.cc b/components/policy/core/common/policy_bundle_unittest.cc
index 53a9d75677129e58040cf4cfc200229a27ded6e4..747ead623230e1f6d434fd44346f5f9880407274 100644
--- a/components/policy/core/common/policy_bundle_unittest.cc
+++ b/components/policy/core/common/policy_bundle_unittest.cc
@@ -9,7 +9,6 @@
#include "base/values.h"
#include "components/policy/core/common/external_data_fetcher.h"
#include "components/policy/core/common/policy_map.h"
-#include "components/policy/core/common/policy_types.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace policy {
@@ -31,19 +30,16 @@
policy->Set("mandatory-user",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(123),
NULL);
policy->Set("mandatory-machine",
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_MACHINE,
- POLICY_SOURCE_CLOUD,
new base::StringValue("omg"),
NULL);
policy->Set("recommended-user",
POLICY_LEVEL_RECOMMENDED,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(true),
NULL);
base::DictionaryValue* dict = new base::DictionaryValue();
@@ -51,7 +47,7 @@
dict->SetInteger("int", 456);
dict->SetString("str", "bbq");
policy->Set("recommended-machine", POLICY_LEVEL_RECOMMENDED,
- POLICY_SCOPE_MACHINE, POLICY_SOURCE_CLOUD, dict, nullptr);
+ POLICY_SCOPE_MACHINE, dict, NULL);
}
// Adds test policies to |policy| based on the parameters:
@@ -66,15 +62,13 @@
policy->Set(kPolicyClashing0,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(value),
NULL);
- policy->Set(kPolicyClashing1, level, scope, POLICY_SOURCE_CLOUD,
- new base::FundamentalValue(value), nullptr);
+ policy->Set(
+ kPolicyClashing1, level, scope, new base::FundamentalValue(value), NULL);
policy->Set(name,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(value),
NULL);
}
@@ -206,31 +200,26 @@
expected.Set(kPolicyClashing0,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(0),
NULL);
expected.Set(kPolicyClashing1,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_MACHINE,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(1),
NULL);
expected.Set(kPolicy0,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(0),
NULL);
expected.Set(kPolicy1,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(1),
NULL);
expected.Set(kPolicy2,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(2),
NULL);
EXPECT_TRUE(merged.Get(PolicyNamespace(POLICY_DOMAIN_CHROME,
@@ -274,7 +263,6 @@
.Set(kPolicy0,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(123),
NULL);
EXPECT_FALSE(bundle.Equals(other));
@@ -284,7 +272,6 @@
.Set(kPolicy0,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_MACHINE,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(123),
NULL);
EXPECT_FALSE(bundle.Equals(other));
@@ -298,7 +285,6 @@
policy_map.Set(kPolicy0,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
new base::FundamentalValue(123),
NULL);
EXPECT_FALSE(bundle.Equals(other));
« no previous file with comments | « components/policy/core/common/generate_policy_source_unittest.cc ('k') | components/policy/core/common/policy_loader_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698