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

Unified Diff: chrome/browser/policy/url_blacklist_policy_handler_unittest.cc

Issue 110643005: Refactored the URLBlacklistManager to avoid chrome/ and content/ dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years 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 | « chrome/browser/policy/url_blacklist_policy_handler.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/url_blacklist_policy_handler_unittest.cc
diff --git a/chrome/browser/policy/url_blacklist_policy_handler_unittest.cc b/chrome/browser/policy/url_blacklist_policy_handler_unittest.cc
index fe1dba34fb1c87bcb7e7e109ef41c85cd9a6479e..fccf545492b3b567c344ceac929d030197312886 100644
--- a/chrome/browser/policy/url_blacklist_policy_handler_unittest.cc
+++ b/chrome/browser/policy/url_blacklist_policy_handler_unittest.cc
@@ -5,9 +5,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_value_map.h"
#include "chrome/browser/policy/url_blacklist_policy_handler.h"
-#include "chrome/common/pref_names.h"
#include "components/policy/core/browser/policy_error_map.h"
#include "components/policy/core/common/policy_map.h"
+#include "components/policy/core/common/policy_pref_names.h"
#include "grit/generated_resources.h"
#include "policy/policy_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -74,7 +74,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
TEST_F(URLBlacklistPolicyHandlerTest, ApplyPolicySettings_NothingSpecified) {
ApplyPolicies();
- EXPECT_FALSE(prefs_.GetValue(prefs::kUrlBlacklist, NULL));
+ EXPECT_FALSE(prefs_.GetValue(policy_prefs::kUrlBlacklist, NULL));
}
TEST_F(URLBlacklistPolicyHandlerTest,
@@ -82,7 +82,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
// The policy expects a list. Give it a boolean.
SetPolicy(key::kDisabledSchemes, base::Value::CreateBooleanValue(false));
ApplyPolicies();
- EXPECT_FALSE(prefs_.GetValue(prefs::kUrlBlacklist, NULL));
+ EXPECT_FALSE(prefs_.GetValue(policy_prefs::kUrlBlacklist, NULL));
}
TEST_F(URLBlacklistPolicyHandlerTest,
@@ -90,7 +90,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
// The policy expects a list. Give it a boolean.
SetPolicy(key::kURLBlacklist, base::Value::CreateBooleanValue(false));
ApplyPolicies();
- EXPECT_FALSE(prefs_.GetValue(prefs::kUrlBlacklist, NULL));
+ EXPECT_FALSE(prefs_.GetValue(policy_prefs::kUrlBlacklist, NULL));
}
TEST_F(URLBlacklistPolicyHandlerTest,
@@ -98,7 +98,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
SetPolicy(key::kDisabledSchemes, new base::ListValue);
ApplyPolicies();
base::Value* out;
- EXPECT_TRUE(prefs_.GetValue(prefs::kUrlBlacklist, &out));
+ EXPECT_TRUE(prefs_.GetValue(policy_prefs::kUrlBlacklist, &out));
base::ListValue* out_list;
EXPECT_TRUE(out->GetAsList(&out_list));
EXPECT_EQ(0U, out_list->GetSize());
@@ -109,7 +109,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
SetPolicy(key::kURLBlacklist, new base::ListValue);
ApplyPolicies();
base::Value* out;
- EXPECT_TRUE(prefs_.GetValue(prefs::kUrlBlacklist, &out));
+ EXPECT_TRUE(prefs_.GetValue(policy_prefs::kUrlBlacklist, &out));
base::ListValue* out_list;
EXPECT_TRUE(out->GetAsList(&out_list));
EXPECT_EQ(0U, out_list->GetSize());
@@ -125,7 +125,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
// The element should be skipped.
base::Value* out;
- EXPECT_TRUE(prefs_.GetValue(prefs::kUrlBlacklist, &out));
+ EXPECT_TRUE(prefs_.GetValue(policy_prefs::kUrlBlacklist, &out));
base::ListValue* out_list;
EXPECT_TRUE(out->GetAsList(&out_list));
EXPECT_EQ(0U, out_list->GetSize());
@@ -141,7 +141,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
// The element should be skipped.
base::Value* out;
- EXPECT_TRUE(prefs_.GetValue(prefs::kUrlBlacklist, &out));
+ EXPECT_TRUE(prefs_.GetValue(policy_prefs::kUrlBlacklist, &out));
base::ListValue* out_list;
EXPECT_TRUE(out->GetAsList(&out_list));
EXPECT_EQ(0U, out_list->GetSize());
@@ -155,7 +155,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
ApplyPolicies();
base::Value* out;
- EXPECT_TRUE(prefs_.GetValue(prefs::kUrlBlacklist, &out));
+ EXPECT_TRUE(prefs_.GetValue(policy_prefs::kUrlBlacklist, &out));
base::ListValue* out_list;
EXPECT_TRUE(out->GetAsList(&out_list));
EXPECT_EQ(1U, out_list->GetSize());
@@ -173,7 +173,7 @@ TEST_F(URLBlacklistPolicyHandlerTest,
ApplyPolicies();
base::Value* out;
- EXPECT_TRUE(prefs_.GetValue(prefs::kUrlBlacklist, &out));
+ EXPECT_TRUE(prefs_.GetValue(policy_prefs::kUrlBlacklist, &out));
base::ListValue* out_list;
EXPECT_TRUE(out->GetAsList(&out_list));
EXPECT_EQ(1U, out_list->GetSize());
@@ -195,7 +195,7 @@ TEST_F(URLBlacklistPolicyHandlerTest, ApplyPolicySettings_MergeSuccessful) {
ApplyPolicies();
base::Value* out;
- EXPECT_TRUE(prefs_.GetValue(prefs::kUrlBlacklist, &out));
+ EXPECT_TRUE(prefs_.GetValue(policy_prefs::kUrlBlacklist, &out));
base::ListValue* out_list;
EXPECT_TRUE(out->GetAsList(&out_list));
EXPECT_EQ(2U, out_list->GetSize());
« no previous file with comments | « chrome/browser/policy/url_blacklist_policy_handler.cc ('k') | chrome/browser/profiles/profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698