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

Unified Diff: chrome/browser/extensions/api/messaging/native_messaging_policy_handler_unittest.cc

Issue 1304843004: Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed another test. 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: chrome/browser/extensions/api/messaging/native_messaging_policy_handler_unittest.cc
diff --git a/chrome/browser/extensions/api/messaging/native_messaging_policy_handler_unittest.cc b/chrome/browser/extensions/api/messaging/native_messaging_policy_handler_unittest.cc
index 3e2902a7704f769381c7738ed84b15864eeb0544..f164c01a28d8fba40042958e6940898cd9ed6476 100644
--- a/chrome/browser/extensions/api/messaging/native_messaging_policy_handler_unittest.cc
+++ b/chrome/browser/extensions/api/messaging/native_messaging_policy_handler_unittest.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/extensions/policy_handlers.h"
#include "components/policy/core/browser/policy_error_map.h"
#include "components/policy/core/common/policy_map.h"
+#include "components/policy/core/common/policy_types.h"
#include "policy/policy_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -24,6 +25,7 @@ TEST(NativeMessagingHostListPolicyHandlerTest, CheckPolicySettings) {
policy_map.Set(policy::key::kNativeMessagingBlacklist,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
list.DeepCopy(),
NULL);
{
@@ -36,6 +38,7 @@ TEST(NativeMessagingHostListPolicyHandlerTest, CheckPolicySettings) {
policy_map.Set(policy::key::kNativeMessagingBlacklist,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
list.DeepCopy(),
NULL);
{
@@ -48,6 +51,7 @@ TEST(NativeMessagingHostListPolicyHandlerTest, CheckPolicySettings) {
policy_map.Set(policy::key::kNativeMessagingBlacklist,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
list.DeepCopy(),
NULL);
{
@@ -60,6 +64,7 @@ TEST(NativeMessagingHostListPolicyHandlerTest, CheckPolicySettings) {
policy_map.Set(policy::key::kNativeMessagingBlacklist,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
list.DeepCopy(),
NULL);
{
@@ -86,6 +91,7 @@ TEST(NativeMessagingHostListPolicyHandlerTest, ApplyPolicySettings) {
policy_map.Set(policy::key::kNativeMessagingBlacklist,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
policy.DeepCopy(),
NULL);
handler.ApplyPolicySettings(policy_map, &prefs);
@@ -98,6 +104,7 @@ TEST(NativeMessagingHostListPolicyHandlerTest, ApplyPolicySettings) {
policy_map.Set(policy::key::kNativeMessagingBlacklist,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
policy.DeepCopy(),
NULL);
handler.ApplyPolicySettings(policy_map, &prefs);
@@ -108,6 +115,7 @@ TEST(NativeMessagingHostListPolicyHandlerTest, ApplyPolicySettings) {
policy_map.Set(policy::key::kNativeMessagingBlacklist,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
+ policy::POLICY_SOURCE_CLOUD,
policy.DeepCopy(),
NULL);
handler.ApplyPolicySettings(policy_map, &prefs);

Powered by Google App Engine
This is Rietveld 408576698