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

Unified Diff: chrome/browser/policy/managed_bookmarks_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/policy/managed_bookmarks_policy_handler_unittest.cc
diff --git a/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc b/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc
index 6018b9cc1112012d4103b4916281028086affbd1..50097313ef7629fa011f1c2da6c8780ea4ee08e5 100644
--- a/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc
+++ b/chrome/browser/policy/managed_bookmarks_policy_handler_unittest.cc
@@ -8,6 +8,7 @@
#include "components/policy/core/browser/configuration_policy_pref_store.h"
#include "components/policy/core/browser/configuration_policy_pref_store_test.h"
#include "components/policy/core/common/policy_map.h"
+#include "components/policy/core/common/policy_types.h"
#include "components/policy/core/common/schema.h"
#include "policy/policy_constants.h"
@@ -31,7 +32,10 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, ApplyPolicySettings) {
EXPECT_FALSE(store_->GetValue(bookmarks::prefs::kManagedBookmarks, NULL));
PolicyMap policy;
- policy.Set(key::kManagedBookmarks, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+ policy.Set(key::kManagedBookmarks,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
base::JSONReader::Read("["
" {"
" \"name\": \"Google\","
@@ -112,6 +116,7 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, WrongPolicyType) {
policy.Set(key::kManagedBookmarks,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
new base::StringValue(
"["
" {"
@@ -127,7 +132,10 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, WrongPolicyType) {
#if defined(ENABLE_EXTENSIONS)
TEST_F(ManagedBookmarksPolicyHandlerTest, UnknownKeys) {
PolicyMap policy;
- policy.Set(key::kManagedBookmarks, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+ policy.Set(key::kManagedBookmarks,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
base::JSONReader::Read("["
" {"
" \"name\": \"Google\","
@@ -156,7 +164,10 @@ TEST_F(ManagedBookmarksPolicyHandlerTest, UnknownKeys) {
#if defined(ENABLE_EXTENSIONS)
TEST_F(ManagedBookmarksPolicyHandlerTest, BadBookmark) {
PolicyMap policy;
- policy.Set(key::kManagedBookmarks, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+ policy.Set(key::kManagedBookmarks,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
base::JSONReader::Read("["
" {"
" \"name\": \"Empty\","
« no previous file with comments | « chrome/browser/policy/javascript_policy_handler_unittest.cc ('k') | chrome/browser/policy/policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698