Pier Angelo Vendrame pushed to branch mullvad-browser-140.5.0esr-15.0-1 at The Tor Project / Applications / Mullvad Browser 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: - 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 ===================================== @@ -1,15 +1,18 @@ { + "mullvad-leta": [ + { + "url": "chrome://global/content/search/mullvad-leta.svg", + "imageSize": 16 + } + ], "ddg": [ { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 } ], "ddg-html": [ { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 } ], - "mullvad-leta": [ - { - "url": "chrome://global/content/search/mullvad-leta.svg", - "imageSize": 16 - } + "ddg-noai": [ + { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 } ], "mojeek": [ { "url": "chrome://global/content/search/mojeek.ico", "imageSize": 32 } ===================================== toolkit/components/search/content/base-browser-search-engines.json ===================================== @@ -53,6 +53,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": ["mojeek", "mj"], @@ -111,5 +129,22 @@ "recordType": "defaultEngines", "globalDefault": "mullvad-leta", "globalDefaultPrivate": "mullvad-leta" + }, + { + "recordType": "engineOrders", + "orders": [ + { + "environment": { "allRegionsAndLocales": true }, + "order": [ + "mullvad-leta", + "ddg", + "ddg-html", + "ddg-noai", + "mojeek", + "brave", + "startpage" + ] + } + ] } ] ===================================== toolkit/components/search/tests/xpcshell/test_base_browser.js ===================================== @@ -4,19 +4,22 @@ /** * 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 = { - leta: "https://leta.mullvad.net/?q=test", - ddg: "https://duckduckgo.com/html/?q=test", - "ddg-html": "https://html.duckduckgo.com/html?q=test", + "mullvad-leta": "https://leta.mullvad.net/?q=test", + ddg: "https://duckduckgo.com/?q=test", + "ddg-html": "https://html.duckduckgo.com/html/?q=test", + "ddg-noai": "https://noai.duckduckgo.com/?q=test", mojeek: "https://www.mojeek.com/search?q=test", brave: "https://search.brave.com/search?q=test", startpage: "https://www.startpage.com/sp/search?q=test", }; -const defaultEngine = "leta"; +const defaultEngine = "mullvad-leta"; add_setup(async function setup() { await Services.search.init(); @@ -49,3 +52,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/mullvad-browser/-/compare/950... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/950... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
Pier Angelo Vendrame (@pierov)