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

Side by Side Diff: chrome/browser/search_engines/default_search_manager_unittest.cc

Issue 271793003: components: Extract pref_registry component out of user_prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | Annotate | Revision Log
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/files/scoped_temp_dir.h" 5 #include "base/files/scoped_temp_dir.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/strings/string_split.h" 7 #include "base/strings/string_split.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "chrome/browser/search_engines/default_search_manager.h" 11 #include "chrome/browser/search_engines/default_search_manager.h"
12 #include "chrome/browser/search_engines/template_url.h" 12 #include "chrome/browser/search_engines/template_url.h"
13 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" 13 #include "chrome/browser/search_engines/template_url_prepopulate_data.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "chrome/test/base/testing_pref_service_syncable.h" 15 #include "chrome/test/base/testing_pref_service_syncable.h"
16 #include "components/user_prefs/pref_registry_syncable.h" 16 #include "components/pref_registry/pref_registry_syncable.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace { 19 namespace {
20 // A dictionary to hold all data related to the Default Search Engine. 20 // A dictionary to hold all data related to the Default Search Engine.
21 // Eventually, this should replace all the data stored in the 21 // Eventually, this should replace all the data stored in the
22 // default_search_provider.* prefs. 22 // default_search_provider.* prefs.
23 const char kDefaultSearchProviderData[] = 23 const char kDefaultSearchProviderData[] =
24 "default_search_provider_data.template_url_data"; 24 "default_search_provider_data.template_url_data";
25 25
26 // Checks that the two TemplateURLs are similar. Does not check the id, the 26 // Checks that the two TemplateURLs are similar. Does not check the id, the
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 ExpectSimilar(extension_data_3.get(), 314 ExpectSimilar(extension_data_3.get(),
315 manager.GetDefaultSearchEngine(&source)); 315 manager.GetDefaultSearchEngine(&source));
316 EXPECT_EQ(DefaultSearchManager::FROM_EXTENSION, source); 316 EXPECT_EQ(DefaultSearchManager::FROM_EXTENSION, source);
317 317
318 manager.ClearExtensionControlledDefaultSearchEngine(); 318 manager.ClearExtensionControlledDefaultSearchEngine();
319 319
320 ExpectSimilar(data.get(), manager.GetDefaultSearchEngine(&source)); 320 ExpectSimilar(data.get(), manager.GetDefaultSearchEngine(&source));
321 EXPECT_EQ(DefaultSearchManager::FROM_USER, source); 321 EXPECT_EQ(DefaultSearchManager::FROM_USER, source);
322 } 322 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698