summaryrefslogtreecommitdiffstats
path: root/toolkit/components/search/tests/xpcshell/test-extensions
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /toolkit/components/search/tests/xpcshell/test-extensions
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/search/tests/xpcshell/test-extensions')
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/engines.json128
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/multilocale/_locales/af/messages.json20
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/multilocale/_locales/an/messages.json20
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/multilocale/favicon-af.icobin0 -> 884 bytes
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/multilocale/favicon-an.icobin0 -> 5430 bytes
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/multilocale/manifest.json23
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/plainengine/favicon.icobin0 -> 5430 bytes
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/plainengine/manifest.json58
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/special-engine/favicon.icobin0 -> 5430 bytes
-rw-r--r--toolkit/components/search/tests/xpcshell/test-extensions/special-engine/manifest.json40
10 files changed, 289 insertions, 0 deletions
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/engines.json b/toolkit/components/search/tests/xpcshell/test-extensions/engines.json
new file mode 100644
index 0000000000..0bedb236ab
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/engines.json
@@ -0,0 +1,128 @@
+{
+ "data": [
+ {
+ "webExtension": {
+ "id": "plainengine@search.mozilla.org",
+ "name": "Plain",
+ "search_url": "https://duckduckgo.com/",
+ "params": [
+ {
+ "name": "q",
+ "value": "{searchTerms}"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "contextmenu",
+ "value": "ffcm"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "keyword",
+ "value": "ffab"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "searchbar",
+ "value": "ffsb"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "homepage",
+ "value": "ffhp"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "newtab",
+ "value": "ffnt"
+ }
+ ],
+ "suggest_url": "https://ac.duckduckgo.com/ac/q={searchTerms}&type=list"
+ },
+ "orderHint": 10000,
+ "appliesTo": [
+ {
+ "included": { "everywhere": true },
+ "default": "yes-if-no-other"
+ }
+ ]
+ },
+ {
+ "webExtension": {
+ "id": "special-engine@search.mozilla.org",
+ "name": "Special",
+ "search_url": "https://www.google.com/search",
+ "params": [
+ {
+ "name": "q",
+ "value": "{searchTerms}"
+ },
+ {
+ "name": "client",
+ "condition": "purpose",
+ "purpose": "keyword",
+ "value": "firefox-b-1-ab"
+ },
+ {
+ "name": "client",
+ "condition": "purpose",
+ "purpose": "searchbar",
+ "value": "firefox-b-1"
+ }
+ ],
+ "suggest_url": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
+ },
+ "orderHint": 7000,
+ "appliesTo": [
+ {
+ "included": { "regions": ["tr"] },
+ "default": "yes"
+ },
+ {
+ "included": { "everywhere": true }
+ }
+ ]
+ },
+ {
+ "webExtension": {
+ "id": "multilocale@search.mozilla.org",
+ "default_locale": "af",
+ "searchProvider": {
+ "an": {
+ "name": "Multilocale AN",
+ "description": "A enciclopedia Libre",
+ "search_url": "https://an.wikipedia.org/wiki/Especial:Mirar",
+ "suggest_url": "https://an.wikipedia.org/w/api.php"
+ },
+ "af": {
+ "name": "Multilocale AF",
+ "description": "Wikipedia, die vrye ensiklopedie",
+ "search_url": "https://af.wikipedia.org/wiki/Spesiaal:Soek",
+ "suggest_url": "https://af.wikipedia.org/w/api.php"
+ }
+ }
+ },
+ "orderHint": 6000,
+ "appliesTo": [
+ {
+ "included": { "regions": ["an"] },
+ "webExtension": {
+ "locales": ["an"]
+ },
+ "default": "yes"
+ },
+ {
+ "included": { "regions": ["af"] },
+ "webExtension": {
+ "locales": ["af", "an"]
+ },
+ "orderHint": 6500
+ }
+ ]
+ }
+ ]
+}
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/_locales/af/messages.json b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/_locales/af/messages.json
new file mode 100644
index 0000000000..95e49f9bc5
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/_locales/af/messages.json
@@ -0,0 +1,20 @@
+{
+ "extensionName": {
+ "message": "Multilocale AF"
+ },
+ "extensionDescription": {
+ "message": "Wikipedia, die vrye ensiklopedie"
+ },
+ "url_lang": {
+ "message": "af"
+ },
+ "searchUrl": {
+ "message": "https://af.wikipedia.org/wiki/Spesiaal:Soek"
+ },
+ "suggestUrl": {
+ "message": "https://af.wikipedia.org/w/api.php"
+ },
+ "extensionIcon": {
+ "message": "favicon-af.ico"
+ }
+}
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/_locales/an/messages.json b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/_locales/an/messages.json
new file mode 100644
index 0000000000..6222338596
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/_locales/an/messages.json
@@ -0,0 +1,20 @@
+{
+ "extensionName": {
+ "message": "Multilocale AN"
+ },
+ "extensionDescription": {
+ "message": "A enciclopedia Libre"
+ },
+ "url_lang": {
+ "message": "an"
+ },
+ "searchUrl": {
+ "message": "https://an.wikipedia.org/wiki/Especial:Mirar"
+ },
+ "suggestUrl": {
+ "message": "https://an.wikipedia.org/w/api.php"
+ },
+ "extensionIcon": {
+ "message": "favicon-an.ico"
+ }
+}
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/favicon-af.ico b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/favicon-af.ico
new file mode 100644
index 0000000000..4314071e24
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/favicon-af.ico
Binary files differ
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/favicon-an.ico b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/favicon-an.ico
new file mode 100644
index 0000000000..dda80dfd88
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/favicon-an.ico
Binary files differ
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/manifest.json b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/manifest.json
new file mode 100644
index 0000000000..a117ffb0db
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/multilocale/manifest.json
@@ -0,0 +1,23 @@
+{
+ "name": "__MSG_extensionName__",
+ "manifest_version": 2,
+ "version": "1.0",
+ "browser_specific_settings": {
+ "gecko": {
+ "id": "multilocale@search.mozilla.org"
+ }
+ },
+ "hidden": true,
+ "description": "__MSG_extensionDescription__",
+ "icons": {
+ "16": "__MSG_extensionIcon__"
+ },
+ "default_locale": "af",
+ "chrome_settings_overrides": {
+ "search_provider": {
+ "name": "__MSG_extensionName__",
+ "search_url": "__MSG_searchUrl__",
+ "suggest_url": "__MSG_searchUrl__"
+ }
+ }
+}
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/plainengine/favicon.ico b/toolkit/components/search/tests/xpcshell/test-extensions/plainengine/favicon.ico
new file mode 100644
index 0000000000..dda80dfd88
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/plainengine/favicon.ico
Binary files differ
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/plainengine/manifest.json b/toolkit/components/search/tests/xpcshell/test-extensions/plainengine/manifest.json
new file mode 100644
index 0000000000..cabb4c9f9a
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/plainengine/manifest.json
@@ -0,0 +1,58 @@
+{
+ "name": "Plain",
+ "description": "Plain Engine",
+ "manifest_version": 2,
+ "version": "1.0",
+ "browser_specific_settings": {
+ "gecko": {
+ "id": "plainengine@search.mozilla.org"
+ }
+ },
+ "hidden": true,
+ "icons": {
+ "16": "favicon.ico"
+ },
+ "chrome_settings_overrides": {
+ "search_provider": {
+ "name": "Plain",
+ "search_url": "https://duckduckgo.com/",
+ "params": [
+ {
+ "name": "q",
+ "value": "{searchTerms}"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "contextmenu",
+ "value": "ffcm"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "keyword",
+ "value": "ffab"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "searchbar",
+ "value": "ffsb"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "homepage",
+ "value": "ffhp"
+ },
+ {
+ "name": "t",
+ "condition": "purpose",
+ "purpose": "newtab",
+ "value": "ffnt"
+ }
+ ],
+ "suggest_url": "https://ac.duckduckgo.com/ac/q={searchTerms}&type=list"
+ }
+ }
+}
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/special-engine/favicon.ico b/toolkit/components/search/tests/xpcshell/test-extensions/special-engine/favicon.ico
new file mode 100644
index 0000000000..82339b3b1d
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/special-engine/favicon.ico
Binary files differ
diff --git a/toolkit/components/search/tests/xpcshell/test-extensions/special-engine/manifest.json b/toolkit/components/search/tests/xpcshell/test-extensions/special-engine/manifest.json
new file mode 100644
index 0000000000..1568c6ed55
--- /dev/null
+++ b/toolkit/components/search/tests/xpcshell/test-extensions/special-engine/manifest.json
@@ -0,0 +1,40 @@
+{
+ "name": "Special",
+ "description": "Special Engine",
+ "manifest_version": 2,
+ "version": "1.0",
+ "browser_specific_settings": {
+ "gecko": {
+ "id": "special-engine@search.mozilla.org"
+ }
+ },
+ "hidden": true,
+ "icons": {
+ "16": "favicon.ico"
+ },
+ "chrome_settings_overrides": {
+ "search_provider": {
+ "name": "Special",
+ "search_url": "https://www.google.com/search",
+ "params": [
+ {
+ "name": "q",
+ "value": "{searchTerms}"
+ },
+ {
+ "name": "client",
+ "condition": "purpose",
+ "purpose": "keyword",
+ "value": "firefox-b-1-ab"
+ },
+ {
+ "name": "client",
+ "condition": "purpose",
+ "purpose": "searchbar",
+ "value": "firefox-b-1"
+ }
+ ],
+ "suggest_url": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
+ }
+ }
+}