diff options
Diffstat (limited to 'toolkit/components/search/tests/xpcshell/data1')
6 files changed, 301 insertions, 0 deletions
diff --git a/toolkit/components/search/tests/xpcshell/data1/engine1/manifest.json b/toolkit/components/search/tests/xpcshell/data1/engine1/manifest.json new file mode 100644 index 0000000000..5fa44ea692 --- /dev/null +++ b/toolkit/components/search/tests/xpcshell/data1/engine1/manifest.json @@ -0,0 +1,27 @@ +{ + "name": "engine1", + "manifest_version": 2, + "version": "1.0", + "browser_specific_settings": { + "gecko": { + "id": "engine1@search.mozilla.org" + } + }, + "hidden": true, + "description": "A small test engine", + "icons": { + "16": "favicon.ico" + }, + "chrome_settings_overrides": { + "search_provider": { + "name": "engine1", + "search_url": "https://1.example.com/search", + "params": [ + { + "name": "q", + "value": "{searchTerms}" + } + ] + } + } +} diff --git a/toolkit/components/search/tests/xpcshell/data1/engine2/manifest.json b/toolkit/components/search/tests/xpcshell/data1/engine2/manifest.json new file mode 100644 index 0000000000..7ab094198b --- /dev/null +++ b/toolkit/components/search/tests/xpcshell/data1/engine2/manifest.json @@ -0,0 +1,27 @@ +{ + "name": "engine2", + "manifest_version": 2, + "version": "1.0", + "browser_specific_settings": { + "gecko": { + "id": "engine2@search.mozilla.org" + } + }, + "hidden": true, + "description": "A small test engine", + "icons": { + "16": "favicon.ico" + }, + "chrome_settings_overrides": { + "search_provider": { + "name": "engine2", + "search_url": "https://2.example.com/search", + "params": [ + { + "name": "q", + "value": "{searchTerms}" + } + ] + } + } +} diff --git a/toolkit/components/search/tests/xpcshell/data1/engines.json b/toolkit/components/search/tests/xpcshell/data1/engines.json new file mode 100644 index 0000000000..92ffbd48a0 --- /dev/null +++ b/toolkit/components/search/tests/xpcshell/data1/engines.json @@ -0,0 +1,92 @@ +{ + "data": [ + { + "webExtension": { + "id": "engine1@search.mozilla.org", + "name": "engine1", + "search_url": "https://1.example.com/search", + "params": [ + { + "name": "q", + "value": "{searchTerms}" + } + ] + }, + "orderHint": 10000, + "appliesTo": [ + { + "included": { "everywhere": true }, + "default": "yes-if-no-other", + "defaultPrivate": "yes-if-no-other" + } + ] + }, + { + "webExtension": { + "id": "engine2@search.mozilla.org", + "name": "engine2", + "search_url": "https://2.example.com/search", + "params": [ + { + "name": "q", + "value": "{searchTerms}" + } + ] + }, + "orderHint": 7000, + "appliesTo": [ + { + "included": { "everywhere": true }, + "default": "no" + }, + { + "included": { "everywhere": true }, + "default": "yes", + "experiment": "exp1" + } + ] + }, + { + "webExtension": { + "id": "exp2@search.mozilla.org", + "name": "exp2", + "search_url": "https://2.example.com/searchexp", + "params": [ + { + "name": "q", + "value": "{searchTerms}" + } + ] + }, + "orderHint": 5000, + "appliesTo": [ + { + "included": { "everywhere": true }, + "defaultPrivate": "yes", + "experiment": "exp2" + } + ] + }, + { + "webExtension": { + "id": "exp3@search.mozilla.org", + "name": "exp3", + "search_url": "https://3.example.com/searchexp", + "params": [ + { + "name": "q", + "value": "{searchTerms}" + } + ] + }, + "orderHint": 20000, + "appliesTo": [ + { + "included": { "everywhere": true }, + "default": "yes", + "experiment": "exp3" + } + ] + } + ] +} diff --git a/toolkit/components/search/tests/xpcshell/data1/exp2/manifest.json b/toolkit/components/search/tests/xpcshell/data1/exp2/manifest.json new file mode 100644 index 0000000000..0cd0e080b9 --- /dev/null +++ b/toolkit/components/search/tests/xpcshell/data1/exp2/manifest.json @@ -0,0 +1,27 @@ +{ + "name": "exp2", + "manifest_version": 2, + "version": "1.0", + "browser_specific_settings": { + "gecko": { + "id": "exp2@search.mozilla.org" + } + }, + "hidden": true, + "description": "A small test engine", + "icons": { + "16": "favicon.ico" + }, + "chrome_settings_overrides": { + "search_provider": { + "name": "exp2", + "search_url": "https://2.example.com/searchexp", + "params": [ + { + "name": "q", + "value": "{searchTerms}" + } + ] + } + } +} diff --git a/toolkit/components/search/tests/xpcshell/data1/exp3/manifest.json b/toolkit/components/search/tests/xpcshell/data1/exp3/manifest.json new file mode 100644 index 0000000000..4e023e0fef --- /dev/null +++ b/toolkit/components/search/tests/xpcshell/data1/exp3/manifest.json @@ -0,0 +1,27 @@ +{ + "name": "exp3", + "manifest_version": 2, + "version": "1.0", + "browser_specific_settings": { + "gecko": { + "id": "exp3@search.mozilla.org" + } + }, + "hidden": true, + "description": "A small test engine", + "icons": { + "16": "favicon.ico" + }, + "chrome_settings_overrides": { + "search_provider": { + "name": "exp3", + "search_url": "https://3.example.com/searchexp", + "params": [ + { + "name": "q", + "value": "{searchTerms}" + } + ] + } + } +} diff --git a/toolkit/components/search/tests/xpcshell/data1/search-config-v2.json b/toolkit/components/search/tests/xpcshell/data1/search-config-v2.json new file mode 100644 index 0000000000..98bdfa26ff --- /dev/null +++ b/toolkit/components/search/tests/xpcshell/data1/search-config-v2.json @@ -0,0 +1,101 @@ +{ + "data": [ + { + "base": { + "name": "engine1", + "urls": { + "search": { + "base": "https://1.example.com/search", + "searchTermParamName": "q" + } + }, + "classification": "unknown" + }, + "variants": [{ "environment": { "allRegionsAndLocales": true } }], + "identifier": "engine1", + "recordType": "engine" + }, + { + "base": { + "name": "engine2", + "urls": { + "search": { + "base": "https://2.example.com/search", + "searchTermParamName": "q" + } + }, + "classification": "unknown" + }, + "variants": [{ "environment": { "allRegionsAndLocales": true } }], + "identifier": "engine2", + "recordType": "engine" + }, + { + "base": { + "name": "exp2", + "urls": { + "search": { + "base": "https://2.example.com/searchexp", + "searchTermParamName": "q" + } + }, + "classification": "unknown" + }, + "variants": [ + { + "environment": { "allRegionsAndLocales": true, "experiment": "exp2" } + } + ], + "identifier": "exp2", + "recordType": "engine" + }, + { + "base": { + "name": "exp3", + "urls": { + "search": { + "base": "https://3.example.com/searchexp", + "searchTermParamName": "q" + } + }, + "classification": "unknown" + }, + "variants": [ + { + "environment": { "allRegionsAndLocales": true, "experiment": "exp3" } + } + ], + "identifier": "exp3", + "recordType": "engine" + }, + { + "recordType": "defaultEngines", + "globalDefault": "engine1", + "globalDefaultPrivate": "engine1", + "specificDefaults": [ + { + "environment": { "experiment": "exp1" }, + "default": "engine2" + }, + { + "environment": { "experiment": "exp2" }, + "defaultPrivate": "exp2" + }, + { + "environment": { "experiment": "exp3" }, + "default": "exp3" + } + ] + }, + { + "recordType": "engineOrders", + "orders": [ + { + "environment": { "allRegionsAndLocales": true }, + "order": ["exp3", "engine1", "engine2", "exp2"] + } + ] + } + ], + "timestamp": 1704229342821 +} |