Commits:
-
6f34e2ae
by Pier Angelo Vendrame at 2025-11-05T17:53:58+01:00
fixup! BB 43525: Skip Remote Settings for search engine customization.
MB 483: Ship DDG without AI as a bundled search engine.
MB 487: Use custom order for search engines.
-
7b854cf2
by Pier Angelo Vendrame at 2025-11-05T17:53:59+01:00
fixup! MB 213: Customize the search engines list.
MB 487: Use custom order for search engines.
3 changed files:
Changes:
toolkit/components/search/content/base-browser-search-engine-icons.json
|
1
|
1
|
{
|
|
|
2
|
+ "mullvad-leta": [
|
|
|
3
|
+ {
|
|
|
4
|
+ "url": "chrome://global/content/search/mullvad-leta.svg",
|
|
|
5
|
+ "imageSize": 16
|
|
|
6
|
+ }
|
|
|
7
|
+ ],
|
|
2
|
8
|
"ddg": [
|
|
3
|
9
|
{ "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
|
|
4
|
10
|
],
|
|
5
|
11
|
"ddg-html": [
|
|
6
|
12
|
{ "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
|
|
7
|
13
|
],
|
|
8
|
|
- "mullvad-leta": [
|
|
9
|
|
- {
|
|
10
|
|
- "url": "chrome://global/content/search/mullvad-leta.svg",
|
|
11
|
|
- "imageSize": 16
|
|
12
|
|
- }
|
|
|
14
|
+ "ddg-noai": [
|
|
|
15
|
+ { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
|
|
13
|
16
|
],
|
|
14
|
17
|
"mojeek": [
|
|
15
|
18
|
{ "url": "chrome://global/content/search/mojeek.ico", "imageSize": 32 }
|
toolkit/components/search/content/base-browser-search-engines.json
| ... |
... |
@@ -53,6 +53,24 @@ |
|
53
|
53
|
"recordType": "engine",
|
|
54
|
54
|
"variants": [{ "environment": { "allRegionsAndLocales": true } }]
|
|
55
|
55
|
},
|
|
|
56
|
+ {
|
|
|
57
|
+ "base": {
|
|
|
58
|
+ "aliases": ["ddgnoai"],
|
|
|
59
|
+ "classification": "general",
|
|
|
60
|
+ "name": "DuckDuckGo (no AI)",
|
|
|
61
|
+ "urls": {
|
|
|
62
|
+ "search": {
|
|
|
63
|
+ "base": "https://noai.duckduckgo.com/",
|
|
|
64
|
+ "params": [],
|
|
|
65
|
+ "searchTermParamName": "q"
|
|
|
66
|
+ }
|
|
|
67
|
+ }
|
|
|
68
|
+ },
|
|
|
69
|
+ "id": "91687f02-56dd-4fef-ba26-bf139dff3166",
|
|
|
70
|
+ "identifier": "ddg-noai",
|
|
|
71
|
+ "recordType": "engine",
|
|
|
72
|
+ "variants": [{ "environment": { "allRegionsAndLocales": true } }]
|
|
|
73
|
+ },
|
|
56
|
74
|
{
|
|
57
|
75
|
"base": {
|
|
58
|
76
|
"aliases": ["mojeek", "mj"],
|
| ... |
... |
@@ -111,5 +129,22 @@ |
|
111
|
129
|
"recordType": "defaultEngines",
|
|
112
|
130
|
"globalDefault": "mullvad-leta",
|
|
113
|
131
|
"globalDefaultPrivate": "mullvad-leta"
|
|
|
132
|
+ },
|
|
|
133
|
+ {
|
|
|
134
|
+ "recordType": "engineOrders",
|
|
|
135
|
+ "orders": [
|
|
|
136
|
+ {
|
|
|
137
|
+ "environment": { "allRegionsAndLocales": true },
|
|
|
138
|
+ "order": [
|
|
|
139
|
+ "mullvad-leta",
|
|
|
140
|
+ "ddg",
|
|
|
141
|
+ "ddg-html",
|
|
|
142
|
+ "ddg-noai",
|
|
|
143
|
+ "mojeek",
|
|
|
144
|
+ "brave",
|
|
|
145
|
+ "startpage"
|
|
|
146
|
+ ]
|
|
|
147
|
+ }
|
|
|
148
|
+ ]
|
|
114
|
149
|
}
|
|
115
|
150
|
] |
toolkit/components/search/tests/xpcshell/test_base_browser.js
| ... |
... |
@@ -4,19 +4,22 @@ |
|
4
|
4
|
/**
|
|
5
|
5
|
* This tests the SearchService to check our override of the remote settings is
|
|
6
|
6
|
* working as expected.
|
|
|
7
|
+ *
|
|
|
8
|
+ * When adding new engines, it should be enough to change expectedURLs below.
|
|
7
|
9
|
*/
|
|
8
|
10
|
|
|
9
|
11
|
"use strict";
|
|
10
|
12
|
|
|
11
|
13
|
const expectedURLs = {
|
|
12
|
|
- leta: "https://leta.mullvad.net/?q=test",
|
|
13
|
|
- ddg: "https://duckduckgo.com/html/?q=test",
|
|
14
|
|
- "ddg-html": "https://html.duckduckgo.com/html?q=test",
|
|
|
14
|
+ "mullvad-leta": "https://leta.mullvad.net/?q=test",
|
|
|
15
|
+ ddg: "https://duckduckgo.com/?q=test",
|
|
|
16
|
+ "ddg-html": "https://html.duckduckgo.com/html/?q=test",
|
|
|
17
|
+ "ddg-noai": "https://noai.duckduckgo.com/?q=test",
|
|
15
|
18
|
mojeek: "https://www.mojeek.com/search?q=test",
|
|
16
|
19
|
brave: "https://search.brave.com/search?q=test",
|
|
17
|
20
|
startpage: "https://www.startpage.com/sp/search?q=test",
|
|
18
|
21
|
};
|
|
19
|
|
-const defaultEngine = "leta";
|
|
|
22
|
+const defaultEngine = "mullvad-leta";
|
|
20
|
23
|
|
|
21
|
24
|
add_setup(async function setup() {
|
|
22
|
25
|
await Services.search.init();
|
| ... |
... |
@@ -49,3 +52,11 @@ add_task(function test_checkSearchURLs() { |
|
49
|
52
|
Assert.equal(foundUrl, url, `The URL of ${engine.name} is not altered.`);
|
|
50
|
53
|
}
|
|
51
|
54
|
});
|
|
|
55
|
+
|
|
|
56
|
+add_task(async function test_iconsDoesNotFail() {
|
|
|
57
|
+ for (const id of Object.keys(expectedURLs)) {
|
|
|
58
|
+ const engine = Services.search.getEngineById(id);
|
|
|
59
|
+ // No need to assert anything, as in case of error this method should throw.
|
|
|
60
|
+ await engine.getIconURL();
|
|
|
61
|
+ }
|
|
|
62
|
+}); |
|