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

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

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 years, 3 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
« no previous file with comments | « components/search_engines/DEPS ('k') | components/syncable_prefs.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/memory/scoped_vector.h" 6 #include "base/memory/scoped_vector.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.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/template_url_service_test_util.h" 11 #include "chrome/browser/search_engines/template_url_service_test_util.h"
12 #include "chrome/test/base/testing_pref_service_syncable.h"
13 #include "chrome/test/base/testing_profile.h" 12 #include "chrome/test/base/testing_profile.h"
14 #include "components/search_engines/search_engines_pref_names.h" 13 #include "components/search_engines/search_engines_pref_names.h"
15 #include "components/search_engines/search_terms_data.h" 14 #include "components/search_engines/search_terms_data.h"
16 #include "components/search_engines/template_url.h" 15 #include "components/search_engines/template_url.h"
17 #include "components/search_engines/template_url_prepopulate_data.h" 16 #include "components/search_engines/template_url_prepopulate_data.h"
18 #include "components/search_engines/template_url_service.h" 17 #include "components/search_engines/template_url_service.h"
19 #include "components/search_engines/template_url_service_client.h" 18 #include "components/search_engines/template_url_service_client.h"
19 #include "components/syncable_prefs/testing_pref_service_syncable.h"
20 #include "content/public/test/test_browser_thread_bundle.h" 20 #include "content/public/test/test_browser_thread_bundle.h"
21 #include "net/base/net_util.h" 21 #include "net/base/net_util.h"
22 #include "sync/api/sync_change_processor_wrapper_for_test.h" 22 #include "sync/api/sync_change_processor_wrapper_for_test.h"
23 #include "sync/api/sync_error_factory.h" 23 #include "sync/api/sync_error_factory.h"
24 #include "sync/api/sync_error_factory_mock.h" 24 #include "sync/api/sync_error_factory_mock.h"
25 #include "sync/protocol/search_engine_specifics.pb.h" 25 #include "sync/protocol/search_engine_specifics.pb.h"
26 #include "sync/protocol/sync.pb.h" 26 #include "sync/protocol/sync.pb.h"
27 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
28 28
29 using base::ASCIIToUTF16; 29 using base::ASCIIToUTF16;
(...skipping 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 const char kNewGUID[] = "newdefault"; 2261 const char kNewGUID[] = "newdefault";
2262 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("what"), 2262 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("what"),
2263 "http://thewhat.com/{searchTerms}", 2263 "http://thewhat.com/{searchTerms}",
2264 kNewGUID)); 2264 kNewGUID));
2265 model()->SetUserSelectedDefaultSearchProvider( 2265 model()->SetUserSelectedDefaultSearchProvider(
2266 model()->GetTemplateURLForGUID(kNewGUID)); 2266 model()->GetTemplateURLForGUID(kNewGUID));
2267 2267
2268 EXPECT_EQ(kNewGUID, profile_a()->GetTestingPrefService()->GetString( 2268 EXPECT_EQ(kNewGUID, profile_a()->GetTestingPrefService()->GetString(
2269 prefs::kSyncedDefaultSearchProviderGUID)); 2269 prefs::kSyncedDefaultSearchProviderGUID));
2270 } 2270 }
OLDNEW
« no previous file with comments | « components/search_engines/DEPS ('k') | components/syncable_prefs.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698