| 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 <stddef.h> |
| 6 |
| 7 #include "base/macros.h" |
| 5 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 6 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 7 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 8 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 11 #include "chrome/browser/search_engines/template_url_service_test_util.h" | 14 #include "chrome/browser/search_engines/template_url_service_test_util.h" |
| 12 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
| 13 #include "components/search_engines/search_engines_pref_names.h" | 16 #include "components/search_engines/search_engines_pref_names.h" |
| 14 #include "components/search_engines/search_terms_data.h" | 17 #include "components/search_engines/search_terms_data.h" |
| (...skipping 2246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2261 const char kNewGUID[] = "newdefault"; | 2264 const char kNewGUID[] = "newdefault"; |
| 2262 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("what"), | 2265 model()->Add(CreateTestTemplateURL(ASCIIToUTF16("what"), |
| 2263 "http://thewhat.com/{searchTerms}", | 2266 "http://thewhat.com/{searchTerms}", |
| 2264 kNewGUID)); | 2267 kNewGUID)); |
| 2265 model()->SetUserSelectedDefaultSearchProvider( | 2268 model()->SetUserSelectedDefaultSearchProvider( |
| 2266 model()->GetTemplateURLForGUID(kNewGUID)); | 2269 model()->GetTemplateURLForGUID(kNewGUID)); |
| 2267 | 2270 |
| 2268 EXPECT_EQ(kNewGUID, profile_a()->GetTestingPrefService()->GetString( | 2271 EXPECT_EQ(kNewGUID, profile_a()->GetTestingPrefService()->GetString( |
| 2269 prefs::kSyncedDefaultSearchProviderGUID)); | 2272 prefs::kSyncedDefaultSearchProviderGUID)); |
| 2270 } | 2273 } |
| OLD | NEW |