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

Side by Side Diff: components/search_engines/default_search_policy_handler_unittest.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: update Created 3 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 "components/search_engines/default_search_policy_handler.h" 5 #include "components/search_engines/default_search_policy_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "components/policy/core/browser/configuration_policy_pref_store.h" 10 #include "components/policy/core/browser/configuration_policy_pref_store.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 key::kDefaultSearchProviderEncodings, 160 key::kDefaultSearchProviderEncodings,
161 key::kDefaultSearchProviderAlternateURLs, 161 key::kDefaultSearchProviderAlternateURLs,
162 key::kDefaultSearchProviderSearchTermsReplacementKey, 162 key::kDefaultSearchProviderSearchTermsReplacementKey,
163 key::kDefaultSearchProviderImageURL, 163 key::kDefaultSearchProviderImageURL,
164 key::kDefaultSearchProviderNewTabURL, 164 key::kDefaultSearchProviderNewTabURL,
165 key::kDefaultSearchProviderImageURLPostParams}; 165 key::kDefaultSearchProviderImageURLPostParams};
166 166
167 PolicyMap policy; 167 PolicyMap policy;
168 BuildDefaultSearchPolicy(&policy); 168 BuildDefaultSearchPolicy(&policy);
169 169
170 for (auto policy_name : kPolicyNamesToCheck) { 170 for (auto* policy_name : kPolicyNamesToCheck) {
171 // Check that policy can be successfully applied first. 171 // Check that policy can be successfully applied first.
172 UpdateProviderPolicy(policy); 172 UpdateProviderPolicy(policy);
173 const base::Value* temp = nullptr; 173 const base::Value* temp = nullptr;
174 EXPECT_TRUE(store_->GetValue( 174 EXPECT_TRUE(store_->GetValue(
175 DefaultSearchManager::kDefaultSearchProviderDataPrefName, &temp)); 175 DefaultSearchManager::kDefaultSearchProviderDataPrefName, &temp));
176 176
177 auto old_value = base::WrapUnique(policy.GetValue(policy_name)->DeepCopy()); 177 auto old_value = base::WrapUnique(policy.GetValue(policy_name)->DeepCopy());
178 // BinaryValue is not supported in any current default search policy params. 178 // BinaryValue is not supported in any current default search policy params.
179 // Try changing policy param to BinaryValue and check that policy becomes 179 // Try changing policy param to BinaryValue and check that policy becomes
180 // invalid. 180 // invalid.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 EXPECT_TRUE(dictionary->GetString(DefaultSearchManager::kURL, &value)); 357 EXPECT_TRUE(dictionary->GetString(DefaultSearchManager::kURL, &value));
358 EXPECT_EQ(kFileSearchURL, value); 358 EXPECT_EQ(kFileSearchURL, value);
359 EXPECT_TRUE(dictionary->GetString(DefaultSearchManager::kShortName, &value)); 359 EXPECT_TRUE(dictionary->GetString(DefaultSearchManager::kShortName, &value));
360 EXPECT_EQ("_", value); 360 EXPECT_EQ("_", value);
361 EXPECT_TRUE(dictionary->GetString(DefaultSearchManager::kKeyword, &value)); 361 EXPECT_TRUE(dictionary->GetString(DefaultSearchManager::kKeyword, &value));
362 EXPECT_EQ("_", value); 362 EXPECT_EQ("_", value);
363 } 363 }
364 364
365 } // namespace policy 365 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698