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

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

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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_manager.h" 5 #include "components/search_engines/default_search_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 EXPECT_EQ(expected->alternate_urls, actual->alternate_urls); 43 EXPECT_EQ(expected->alternate_urls, actual->alternate_urls);
44 EXPECT_EQ(expected->safe_for_autoreplace, actual->safe_for_autoreplace); 44 EXPECT_EQ(expected->safe_for_autoreplace, actual->safe_for_autoreplace);
45 EXPECT_EQ(expected->input_encodings, actual->input_encodings); 45 EXPECT_EQ(expected->input_encodings, actual->input_encodings);
46 EXPECT_EQ(expected->search_terms_replacement_key, 46 EXPECT_EQ(expected->search_terms_replacement_key,
47 actual->search_terms_replacement_key); 47 actual->search_terms_replacement_key);
48 } 48 }
49 49
50 // TODO(caitkp): TemplateURLData-ify this. 50 // TODO(caitkp): TemplateURLData-ify this.
51 void SetOverrides(user_prefs::TestingPrefServiceSyncable* prefs, bool update) { 51 void SetOverrides(user_prefs::TestingPrefServiceSyncable* prefs, bool update) {
52 prefs->SetUserPref(prefs::kSearchProviderOverridesVersion, 52 prefs->SetUserPref(prefs::kSearchProviderOverridesVersion,
53 new base::FundamentalValue(1)); 53 new base::Value(1));
54 base::ListValue* overrides = new base::ListValue; 54 base::ListValue* overrides = new base::ListValue;
55 std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue); 55 std::unique_ptr<base::DictionaryValue> entry(new base::DictionaryValue);
56 56
57 entry->SetString("name", update ? "new_foo" : "foo"); 57 entry->SetString("name", update ? "new_foo" : "foo");
58 entry->SetString("keyword", update ? "new_fook" : "fook"); 58 entry->SetString("keyword", update ? "new_fook" : "fook");
59 entry->SetString("search_url", "http://foo.com/s?q={searchTerms}"); 59 entry->SetString("search_url", "http://foo.com/s?q={searchTerms}");
60 entry->SetString("favicon_url", "http://foi.com/favicon.ico"); 60 entry->SetString("favicon_url", "http://foi.com/favicon.ico");
61 entry->SetString("encoding", "UTF-8"); 61 entry->SetString("encoding", "UTF-8");
62 entry->SetInteger("id", 1001); 62 entry->SetInteger("id", 1001);
63 entry->SetString("suggest_url", "http://foo.com/suggest?q={searchTerms}"); 63 entry->SetString("suggest_url", "http://foo.com/suggest?q={searchTerms}");
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 ExpectSimilar(extension_data_3.get(), 322 ExpectSimilar(extension_data_3.get(),
323 manager.GetDefaultSearchEngine(&source)); 323 manager.GetDefaultSearchEngine(&source));
324 EXPECT_EQ(DefaultSearchManager::FROM_EXTENSION, source); 324 EXPECT_EQ(DefaultSearchManager::FROM_EXTENSION, source);
325 325
326 manager.ClearExtensionControlledDefaultSearchEngine(); 326 manager.ClearExtensionControlledDefaultSearchEngine();
327 327
328 ExpectSimilar(data.get(), manager.GetDefaultSearchEngine(&source)); 328 ExpectSimilar(data.get(), manager.GetDefaultSearchEngine(&source));
329 EXPECT_EQ(DefaultSearchManager::FROM_USER, source); 329 EXPECT_EQ(DefaultSearchManager::FROM_USER, source);
330 } 330 }
OLDNEW
« no previous file with comments | « components/prefs/testing_pref_store.cc ('k') | components/search_engines/default_search_policy_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698