Pier Angelo Vendrame pushed to branch base-browser-140.5.0esr-15.0-1 at The Tor
Project / Applications / Tor Browser
Commits:
31d6da1b by Pier Angelo Vendrame at 2025-11-05T16:45:30+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.
- - - - -
3 changed files:
- toolkit/components/search/content/base-browser-search-engine-icons.json
- toolkit/components/search/content/base-browser-search-engines.json
- toolkit/components/search/tests/xpcshell/test_base_browser.js
Changes:
=====================================
toolkit/components/search/content/base-browser-search-engine-icons.json
=====================================
@@ -2,6 +2,9 @@
"ddg": [
{ "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
],
+ "ddg-noai": [
+ { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
+ ],
"startpage": [
{
"url": "chrome://global/content/search/startpage-16.png",
=====================================
toolkit/components/search/content/base-browser-search-engines.json
=====================================
@@ -17,6 +17,24 @@
"recordType": "engine",
"variants": [{ "environment": { "allRegionsAndLocales": true } }]
},
+ {
+ "base": {
+ "aliases": ["ddgnoai"],
+ "classification": "general",
+ "name": "DuckDuckGo (no AI)",
+ "urls": {
+ "search": {
+ "base": "https://noai.duckduckgo.com/",
+ "params": [],
+ "searchTermParamName": "q"
+ }
+ }
+ },
+ "id": "91687f02-56dd-4fef-ba26-bf139dff3166",
+ "identifier": "ddg-noai",
+ "recordType": "engine",
+ "variants": [{ "environment": { "allRegionsAndLocales": true } }]
+ },
{
"base": {
"aliases": ["startpage", "sp"],
@@ -39,5 +57,18 @@
"recordType": "defaultEngines",
"globalDefault": "ddg",
"globalDefaultPrivate": "ddg"
+ },
+ {
+ "recordType": "engineOrders",
+ "orders": [
+ {
+ "environment": { "allRegionsAndLocales": true },
+ "order": [
+ "ddg",
+ "ddg-noai",
+ "startpage"
+ ]
+ }
+ ]
}
]
=====================================
toolkit/components/search/tests/xpcshell/test_base_browser.js
=====================================
@@ -4,12 +4,15 @@
/**
* This tests the SearchService to check our override of the remote settings is
* working as expected.
+ *
+ * When adding new engines, it should be enough to change expectedURLs below.
*/
"use strict";
const expectedURLs = {
ddg: "https://duckduckgo.com/?q=test",
+ "ddg-noai": "https://noai.duckduckgo.com/?q=test",
startpage: "https://www.startpage.com/sp/search?q=test",
};
const defaultEngine = "ddg";
@@ -45,3 +48,11 @@ add_task(function test_checkSearchURLs() {
Assert.equal(foundUrl, url, `The URL of ${engine.name} is not altered.`);
}
});
+
+add_task(async function test_iconsDoesNotFail() {
+ for (const id of Object.keys(expectedURLs)) {
+ const engine = Services.search.getEngineById(id);
+ // No need to assert anything, as in case of error this method should
throw.
+ await engine.getIconURL();
+ }
+});
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/31d6da1b188b7df79a6c567d933793227fcafc67
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/31d6da1b188b7df79a6c567d933793227fcafc67
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]