OLD | NEW |
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/search_terms_data.h" | |
12 #include "chrome/browser/search_engines/template_url.h" | 11 #include "chrome/browser/search_engines/template_url.h" |
13 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 12 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
14 #include "chrome/browser/search_engines/template_url_service.h" | 13 #include "chrome/browser/search_engines/template_url_service.h" |
15 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
16 #include "chrome/browser/search_engines/template_url_service_test_util.h" | 15 #include "chrome/browser/search_engines/template_url_service_test_util.h" |
| 16 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "chrome/common/url_constants.h" | 18 #include "chrome/common/url_constants.h" |
19 #include "chrome/test/base/testing_pref_service_syncable.h" | 19 #include "chrome/test/base/testing_pref_service_syncable.h" |
20 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
21 #include "extensions/common/constants.h" | 21 #include "extensions/common/constants.h" |
22 #include "net/base/net_util.h" | 22 #include "net/base/net_util.h" |
23 #include "sync/api/sync_change_processor_wrapper_for_test.h" | 23 #include "sync/api/sync_change_processor_wrapper_for_test.h" |
24 #include "sync/api/sync_error_factory.h" | 24 #include "sync/api/sync_error_factory.h" |
25 #include "sync/api/sync_error_factory_mock.h" | 25 #include "sync/api/sync_error_factory_mock.h" |
26 #include "sync/protocol/search_engine_specifics.pb.h" | 26 #include "sync/protocol/search_engine_specifics.pb.h" |
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2229 const char kNewGUID[] = "newdefault"; | 2229 const char kNewGUID[] = "newdefault"; |
2230 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("what"), | 2230 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("what"), |
2231 "http://thewhat.com/{searchTerms}", | 2231 "http://thewhat.com/{searchTerms}", |
2232 kNewGUID)); | 2232 kNewGUID)); |
2233 model()->SetUserSelectedDefaultSearchProvider( | 2233 model()->SetUserSelectedDefaultSearchProvider( |
2234 model()->GetTemplateURLForGUID(kNewGUID)); | 2234 model()->GetTemplateURLForGUID(kNewGUID)); |
2235 | 2235 |
2236 EXPECT_EQ(kNewGUID, profile_a()->GetTestingPrefService()->GetString( | 2236 EXPECT_EQ(kNewGUID, profile_a()->GetTestingPrefService()->GetString( |
2237 prefs::kSyncedDefaultSearchProviderGUID)); | 2237 prefs::kSyncedDefaultSearchProviderGUID)); |
2238 } | 2238 } |
OLD | NEW |