Index: components/search_engines/search_engines_test_util.h |
diff --git a/components/search_engines/search_engines_test_util.h b/components/search_engines/search_engines_test_util.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6fa017e43d10d8e1ef683361fd3a37025210fa17 |
--- /dev/null |
+++ b/components/search_engines/search_engines_test_util.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_TEST_UTIL_H_ |
+#define COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_TEST_UTIL_H_ |
+ |
+#include <string> |
+ |
+struct TemplateURLData; |
+ |
+namespace sync_preferences { |
+class TestingPrefServiceSyncable; |
+} |
+ |
+// 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.
|
+// 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.
|
+std::unique_ptr<TemplateURLData> GenerateDummyTemplateURLData( |
+ const std::string& provider_name); |
+ |
+// Checks that the two TemplateURLs are similar. Does not check the id, the |
+// date_created or the last_modified time. Neither pointer should be null. |
+void ExpectSimilar(const TemplateURLData* expected, |
+ const TemplateURLData* actual); |
+ |
+// 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.
|
+// 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.
|
+void SetExtensionDefaultSearchInPrefs( |
+ sync_preferences::TestingPrefServiceSyncable* prefs, |
+ const TemplateURLData& extension_data); |
+ |
+// 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.
|
+// pref service. |
+void RemoveExtensionDefaultSearchFromPrefs( |
+ sync_preferences::TestingPrefServiceSyncable* prefs); |
+ |
+#endif // COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_TEST_UTIL_H_ |