Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_TEST_UTIL_H_ | |
| 6 #define COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_TEST_UTIL_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 struct TemplateURLData; | |
| 11 | |
| 12 namespace sync_preferences { | |
| 13 class TestingPrefServiceSyncable; | |
| 14 } | |
| 15 | |
| 16 // Generate TemplateURLData structure useful for tests filled with values | |
|
Peter Kasting
2017/01/06 01:44:57
Nit: Generate -> Generates a
Alexander Yashkin
2017/01/07 12:56:00
Fixed.
| |
| 17 // autogenerated from provider_name param. | |
|
Peter Kasting
2017/01/06 01:44:58
Nit: provider_name param -> |provider_name|
Alexander Yashkin
2017/01/07 12:56:00
Done.
| |
| 18 std::unique_ptr<TemplateURLData> GenerateDummyTemplateURLData( | |
| 19 const std::string& provider_name); | |
| 20 | |
| 21 // Checks that the two TemplateURLs are similar. Does not check the id, the | |
| 22 // date_created or the last_modified time. Neither pointer should be null. | |
| 23 void ExpectSimilar(const TemplateURLData* expected, | |
| 24 const TemplateURLData* actual); | |
| 25 | |
| 26 // Writes default search engine |extension_data| into extension controlled | |
|
Peter Kasting
2017/01/06 01:44:58
Nit: extension controlled -> the extension-control
Alexander Yashkin
2017/01/07 12:56:00
Fixed.
| |
| 27 // preference in test pref service. | |
|
Peter Kasting
2017/01/06 01:44:58
Nit: test pref service -> |prefs| (2 places)
Alexander Yashkin
2017/01/07 12:56:00
Fixed.
| |
| 28 void SetExtensionDefaultSearchInPrefs( | |
| 29 sync_preferences::TestingPrefServiceSyncable* prefs, | |
| 30 const TemplateURLData& extension_data); | |
| 31 | |
| 32 // Removes extension controlled default search engine preference from test | |
|
Peter Kasting
2017/01/06 01:44:57
Nit: Removes extension controlled -> Removes the e
Alexander Yashkin
2017/01/07 12:56:00
Fixed.
| |
| 33 // pref service. | |
| 34 void RemoveExtensionDefaultSearchFromPrefs( | |
| 35 sync_preferences::TestingPrefServiceSyncable* prefs); | |
| 36 | |
| 37 #endif // COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_TEST_UTIL_H_ | |
| OLD | NEW |