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

Unified Diff: components/search_engines/search_engines_test_util.h

Issue 2479113002: Make extensions DSE persistent in browser prefs (Closed)
Patch Set: Added DSE tests Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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..b023c5fdd0fcfdcae8ef7dff460f3291ddef4489
--- /dev/null
+++ b/components/search_engines/search_engines_test_util.h
@@ -0,0 +1,30 @@
+// 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 policy {
+class PolicyMap;
+}
+
+// Generate TemplateUrlData structure useful for tests filled with values
+// autogenerated from type param.
+std::unique_ptr<TemplateURLData> GenerateDummyTemplateURLData(
+ const std::string& type);
vasilii 2016/11/30 14:00:03 Not clear what |type| is. From the implementation
Alexander Yashkin 2016/12/05 18:16:48 Changed type to provider_name. I think parameter i
+
+// 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);
+
+// Build default dearch policy for TemplateUrlData object.
vasilii 2016/11/30 14:00:03 s/dearch/search
Alexander Yashkin 2016/12/05 18:16:48 Fixed
+void BuildDefaultSearchPolicy(const TemplateURLData& data,
+ policy::PolicyMap* policy);
vasilii 2016/11/30 14:00:03 In what files do you use those functions? If it's
Alexander Yashkin 2016/12/05 18:16:48 Deleted this function.
+
+#endif // COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINES_TEST_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698