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

Side by Side Diff: chrome/browser/search/contextual_search_policy_handler_android_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/prefs/pref_value_map.h"
6 #include "base/values.h" 5 #include "base/values.h"
7 #include "chrome/browser/search/contextual_search_policy_handler_android.h" 6 #include "chrome/browser/search/contextual_search_policy_handler_android.h"
8 #include "chrome/common/pref_names.h" 7 #include "chrome/common/pref_names.h"
9 #include "components/policy/core/common/policy_map.h" 8 #include "components/policy/core/common/policy_map.h"
9 #include "components/prefs/pref_value_map.h"
10 #include "policy/policy_constants.h" 10 #include "policy/policy_constants.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace policy { 13 namespace policy {
14 14
15 TEST(ContextualSearchPolicyHandlerAndroidTest, Default) { 15 TEST(ContextualSearchPolicyHandlerAndroidTest, Default) {
16 PolicyMap policy; 16 PolicyMap policy;
17 PrefValueMap prefs; 17 PrefValueMap prefs;
18 ContextualSearchPolicyHandlerAndroid handler; 18 ContextualSearchPolicyHandlerAndroid handler;
19 handler.ApplyPolicySettings(policy, &prefs); 19 handler.ApplyPolicySettings(policy, &prefs);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ContextualSearchPolicyHandlerAndroid handler; 52 ContextualSearchPolicyHandlerAndroid handler;
53 handler.ApplyPolicySettings(policy, &prefs); 53 handler.ApplyPolicySettings(policy, &prefs);
54 54
55 // Disabling Contextual Search should switch the pref to managed. 55 // Disabling Contextual Search should switch the pref to managed.
56 std::string pref_value; 56 std::string pref_value;
57 EXPECT_TRUE(prefs.GetString(prefs::kContextualSearchEnabled, &pref_value)); 57 EXPECT_TRUE(prefs.GetString(prefs::kContextualSearchEnabled, &pref_value));
58 EXPECT_EQ("false", pref_value); 58 EXPECT_EQ("false", pref_value);
59 } 59 }
60 60
61 } // namespace policy 61 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698