Skip to content

Instantly share code, notes, and snippets.

@daleharvey
Created September 5, 2019 13:14
Show Gist options
  • Save daleharvey/6446c150368069242c8e27633248dceb to your computer and use it in GitHub Desktop.
Save daleharvey/6446c150368069242c8e27633248dceb to your computer and use it in GitHub Desktop.
diff --git a/toolkit/components/search/moz.build b/toolkit/components/search/moz.build
index b45f72d106be..c7b60f5fd41a 100644
--- a/toolkit/components/search/moz.build
+++ b/toolkit/components/search/moz.build
@@ -11,6 +11,7 @@ XPCSHELL_TESTS_MANIFESTS += [
'tests/xpcshell/searchconfigs/xpcshell-2.ini',
'tests/xpcshell/searchconfigs/xpcshell-3.ini',
'tests/xpcshell/searchconfigs/xpcshell-4.ini',
+ 'tests/xpcshell/xpcshell-modernconfig.ini',
'tests/xpcshell/xpcshell.ini',
]
diff --git a/toolkit/components/search/tests/xpcshell/head_modernconfig.js b/toolkit/components/search/tests/xpcshell/head_modernconfig.js
new file mode 100644
index 000000000000..71659f63da0e
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/head_modernconfig.js
@@ -0,0 +1,8 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/* import-globals-from head_search.js */
+
+"use strict";
+
+Services.prefs.setBoolPref("browser.search.modernConfig", true);
diff --git a/toolkit/components/search/tests/xpcshell/xpcshell-common.ini b/toolkit/components/search/tests/xpcshell/xpcshell-common.ini
new file mode 100644
index 000000000000..0d4ad96318e4
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/xpcshell-common.ini
@@ -0,0 +1,61 @@
+[test_engine_selector.js]
+[test_nocache.js]
+[test_bug930456.js]
+[test_bug930456_child.js]
+skip-if = true # Is confusing
+[test_engine_set_alias.js]
+[test_hasEngineWithURL.js]
+[test_identifiers.js]
+[test_ignorelist_update.js]
+[test_ignorelist.js]
+[test_invalid_engine_from_dir.js]
+[test_json_cache.js]
+[test_json_cache_ignorelist.js]
+[test_list_json_locale.js]
+[test_list_json_no_private_default.js]
+[test_list_json_searchdefault.js]
+[test_list_json_searchdefault_distro.js]
+[test_list_json_searchorder.js]
+[test_location.js]
+[test_location_error.js]
+[test_location_malformed_json.js]
+[test_location_timeout.js]
+[test_location_timeout_xhr.js]
+[test_nodb_pluschanges.js]
+[test_save_sorted_engines.js]
+[test_pref.js]
+[test_defaultEngine.js]
+[test_defaultEngine_fallback.js]
+[test_defaultPrivateEngine.js]
+[test_notifications.js]
+[test_parseSubmissionURL.js]
+[test_SearchStaticData.js]
+[test_addEngine_callback.js]
+[test_multipleIcons.js]
+[test_resultDomain.js]
+[test_searchSuggest.js]
+[test_async.js]
+[test_async_addon.js]
+tags = addons
+[test_async_distribution.js]
+[test_rel_searchform.js]
+[test_reloadEngines.js]
+[test_remove_profile_engine.js]
+[test_selectedEngine.js]
+[test_geodefaults.js]
+[test_hidden.js]
+[test_require_engines_in_cache.js]
+skip-if = (verify && !debug && (os == 'linux'))
+[test_svg_icon.js]
+[test_addEngineWithDetails.js]
+[test_addEngineWithDetailsObject.js]
+[test_addEngineWithExtensionID.js]
+[test_chromeresource_icon2.js]
+[test_engineUpdate.js]
+[test_paramSubstitution.js]
+[test_migrateWebExtensionEngine.js]
+[test_sendSubmissionURL.js]
+[test_validate_engines.js]
+[test_validate_manifests.js]
+[test_webextensions_install.js]
+[test_purpose.js]
diff --git a/toolkit/components/search/tests/xpcshell/xpcshell-modernconfig.ini b/toolkit/components/search/tests/xpcshell/xpcshell-modernconfig.ini
new file mode 100644
index 000000000000..9e956df852fa
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/xpcshell-modernconfig.ini
@@ -0,0 +1,6 @@
+[DEFAULT]
+head = head_search.js head_opensearch.js head_modernconfig.js
+firefox-appdir = browser
+tags=searchmodern
+
+[include:xpcshell-common.ini]
diff --git a/toolkit/components/search/tests/xpcshell/xpcshell.ini b/toolkit/components/search/tests/xpcshell/xpcshell.ini
index 007a9f59187e..63992031d260 100644
--- a/toolkit/components/search/tests/xpcshell/xpcshell.ini
+++ b/toolkit/components/search/tests/xpcshell/xpcshell.ini
@@ -1,121 +1,6 @@
[DEFAULT]
head = head_search.js head_opensearch.js
firefox-appdir = browser
-skip-if = toolkit == 'android'
-support-files =
- data/big_icon.ico
- data/chrome.manifest
- data/engine.xml
- data/engine/manifest.json
- data/engine2.xml
- data/engine2/manifest.json
- data/engine-addon.xml
- data/engine-addon/manifest.json
- data/engine-override.xml
- data/engine-app/manifest.json
- data/engine-fr.xml
- data/engine-fr/manifest.json
- data/engine-reordered/manifest.json
- data/engineMaker.sjs
- data/engine-pref/manifest.json
- data/engine-rel-searchform/manifest.json
- data/engine-rel-searchform.xml
- data/engine-rel-searchform-post/manifest.json
- data/engine-rel-searchform-post.xml
- data/engine-rel-searchform-purpose/manifest.json
- data/engine-system-purpose/manifest.json
- data/engineImages.xml
- data/engine-chromeicon/manifest.json
- data/engine-chromeicon.xml
- data/engine-resourceicon/manifest.json
- data/engine-resourceicon.xml
- data/ico-size-16x16-png.ico
- data/invalid-engine.xml
- data/install.rdf
- data/list.json
- data/search.json
- data/searchSuggestions.sjs
- data/searchTest.jar
- data/search-extensions/list.json
- data/search-extensions/hidden/manifest.json
- data/search-extensions/bug645970/manifest.json
- data/test-extensions/list.json
- data/test-extensions/plainengine/favicon.ico
- data/test-extensions/plainengine/manifest.json
- data/test-extensions/special-engine/favicon.ico
- data/test-extensions/special-engine/manifest.json
- data/test-extensions/multilocale/favicon.ico
- data/test-extensions/multilocale/manifest.json
- data/test-extensions/multilocale/_locales/af/messages.json
- data/test-extensions/multilocale/_locales/an/messages.json
tags=searchmain
-[test_engine_selector.js]
-[test_nocache.js]
-[test_big_icon.js]
-[test_bug930456.js]
-[test_bug930456_child.js]
-skip-if = true # Is confusing
-[test_engine_set_alias.js]
-[test_hasEngineWithURL.js]
-[test_identifiers.js]
-[test_ignorelist_update.js]
-[test_ignorelist.js]
-[test_invalid_engine_from_dir.js]
-[test_json_cache.js]
-[test_json_cache_ignorelist.js]
-support-files = data/search_ignorelist.json
-[test_list_json_locale.js]
-[test_list_json_no_private_default.js]
-support-files =
- data1/engine1/manifest.json
- data1/engine2/manifest.json
- data1/list.json
-[test_list_json_searchdefault.js]
-[test_list_json_searchdefault_distro.js]
-[test_list_json_searchorder.js]
-[test_location.js]
-[test_location_error.js]
-[test_location_malformed_json.js]
-[test_location_timeout.js]
-[test_location_timeout_xhr.js]
-[test_nodb_pluschanges.js]
-[test_save_sorted_engines.js]
-[test_pref.js]
-[test_defaultEngine.js]
-[test_defaultEngine_fallback.js]
-[test_defaultPrivateEngine.js]
-[test_notifications.js]
-[test_parseSubmissionURL.js]
-[test_SearchStaticData.js]
-[test_addEngine_callback.js]
-[test_multipleIcons.js]
-[test_resultDomain.js]
-[test_searchSuggest.js]
-[test_searchSuggest_cookies.js]
-[test_async.js]
-[test_async_addon.js]
-tags = addons
-[test_async_distribution.js]
-[test_async_disthidden.js]
-[test_rel_searchform.js]
-[test_reloadEngines.js]
-[test_remove_profile_engine.js]
-[test_selectedEngine.js]
-[test_geodefaults.js]
-[test_hidden.js]
-[test_require_engines_in_cache.js]
-skip-if = (verify && !debug && (os == 'linux'))
-[test_svg_icon.js]
-[test_addEngineWithDetails.js]
-[test_addEngineWithDetailsObject.js]
-[test_addEngineWithExtensionID.js]
-[test_chromeresource_icon2.js]
-[test_engineUpdate.js]
-[test_paramSubstitution.js]
-[test_migrateWebExtensionEngine.js]
-[test_sendSubmissionURL.js]
-[test_validate_engines.js]
-[test_validate_manifests.js]
-[test_webextensions_install.js]
-[test_purpose.js]
+[include:xpcshell-common.ini]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment