Index: components/search_engines/default_search_policy_handler_unittest.cc |
diff --git a/components/search_engines/default_search_policy_handler_unittest.cc b/components/search_engines/default_search_policy_handler_unittest.cc |
index fece4e7a298eebc33e48f89c25e6e7803a1d6cf5..3f9c6ac1c4066c95eddb453d17ef1a7c889b356b 100644 |
--- a/components/search_engines/default_search_policy_handler_unittest.cc |
+++ b/components/search_engines/default_search_policy_handler_unittest.cc |
@@ -14,13 +14,6 @@ |
#include "components/search_engines/default_search_manager.h" |
#include "components/search_engines/search_engines_pref_names.h" |
-namespace { |
-// TODO(caitkp): Should we find a way to route this through DefaultSearchManager |
-// to avoid hardcoding this here? |
-const char kDefaultSearchProviderData[] = |
- "default_search_provider_data.template_url_data"; |
-} // namespace |
- |
namespace policy { |
class DefaultSearchPolicyHandlerTest |
@@ -133,7 +126,8 @@ TEST_F(DefaultSearchPolicyHandlerTest, MissingUrl) { |
UpdateProviderPolicy(policy); |
const base::Value* temp = nullptr; |
- EXPECT_FALSE(store_->GetValue(kDefaultSearchProviderData, &temp)); |
+ EXPECT_FALSE(store_->GetValue( |
+ DefaultSearchManager::kDefaultSearchProviderDataPrefName, &temp)); |
} |
// Checks that if the default search policy is invalid, that no elements of the |
@@ -148,7 +142,8 @@ TEST_F(DefaultSearchPolicyHandlerTest, Invalid) { |
UpdateProviderPolicy(policy); |
const base::Value* temp = nullptr; |
- EXPECT_FALSE(store_->GetValue(kDefaultSearchProviderData, &temp)); |
+ EXPECT_FALSE(store_->GetValue( |
+ DefaultSearchManager::kDefaultSearchProviderDataPrefName, &temp)); |
} |
// Checks that for a fully defined search policy, all elements have been |
@@ -162,7 +157,8 @@ TEST_F(DefaultSearchPolicyHandlerTest, FullyDefined) { |
const base::DictionaryValue* dictionary; |
std::string value; |
const base::ListValue* list_value; |
- EXPECT_TRUE(store_->GetValue(kDefaultSearchProviderData, &temp)); |
+ EXPECT_TRUE(store_->GetValue( |
+ DefaultSearchManager::kDefaultSearchProviderDataPrefName, &temp)); |
temp->GetAsDictionary(&dictionary); |
EXPECT_TRUE(dictionary->GetString(DefaultSearchManager::kURL, &value)); |
@@ -224,7 +220,8 @@ TEST_F(DefaultSearchPolicyHandlerTest, Disabled) { |
UpdateProviderPolicy(policy); |
const base::Value* temp = NULL; |
const base::DictionaryValue* dictionary; |
- EXPECT_TRUE(store_->GetValue(kDefaultSearchProviderData, &temp)); |
+ EXPECT_TRUE(store_->GetValue( |
+ DefaultSearchManager::kDefaultSearchProviderDataPrefName, &temp)); |
temp->GetAsDictionary(&dictionary); |
bool disabled = false; |
EXPECT_TRUE(dictionary->GetBoolean(DefaultSearchManager::kDisabledByPolicy, |
@@ -248,7 +245,8 @@ TEST_F(DefaultSearchPolicyHandlerTest, MinimallyDefined) { |
const base::DictionaryValue* dictionary; |
std::string value; |
const base::ListValue* list_value; |
- EXPECT_TRUE(store_->GetValue(kDefaultSearchProviderData, &temp)); |
+ EXPECT_TRUE(store_->GetValue( |
+ DefaultSearchManager::kDefaultSearchProviderDataPrefName, &temp)); |
temp->GetAsDictionary(&dictionary); |
// Name and keyword should be derived from host. |
@@ -306,7 +304,8 @@ TEST_F(DefaultSearchPolicyHandlerTest, FileURL) { |
const base::DictionaryValue* dictionary; |
std::string value; |
- EXPECT_TRUE(store_->GetValue(kDefaultSearchProviderData, &temp)); |
+ EXPECT_TRUE(store_->GetValue( |
+ DefaultSearchManager::kDefaultSearchProviderDataPrefName, &temp)); |
temp->GetAsDictionary(&dictionary); |
EXPECT_TRUE(dictionary->GetString(DefaultSearchManager::kURL, &value)); |