tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b52889143abd3938669b0c2ce3c394507677fdaa
parent 9d9307780f9d0ae69339cfdd5c3e147b460e21e1
Author: Florian Quèze <florian@queze.net>
Date:   Tue, 30 Sep 2025 20:41:01 +0000

Bug 1991615 - merge test_ebay.js into test_searchconfigs.js, r=Standard8.

Differential Revision: https://phabricator.services.mozilla.com/D266781

Diffstat:
Dtoolkit/components/search/tests/xpcshell/searchconfigs/test_ebay.js | 302------------------------------------------------------------------------------
Mtoolkit/components/search/tests/xpcshell/searchconfigs/test_searchconfig.js | 291++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtoolkit/components/search/tests/xpcshell/searchconfigs/xpcshell.toml | 10----------
Mtoolkit/components/search/tests/xpcshell/xpcshell.toml | 4----
4 files changed, 291 insertions(+), 316 deletions(-)

diff --git a/toolkit/components/search/tests/xpcshell/searchconfigs/test_ebay.js b/toolkit/components/search/tests/xpcshell/searchconfigs/test_ebay.js @@ -1,302 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -"use strict"; - -const DOMAIN_LOCALES = { - "ebay-ca": ["en-CA"], - "ebay-ch": ["rm"], - "ebay-de": ["de", "dsb", "hsb"], - "ebay-es": ["an", "ast", "ca", "ca-valencia", "es-ES", "eu", "gl"], - "ebay-ie": ["ga-IE", "ie"], - "ebay-it": ["fur", "it", "lij", "sc"], - "ebay-nl": ["fy-NL", "nl"], - "ebay-uk": ["cy", "en-GB", "gd"], -}; - -const test = new SearchConfigTest({ - identifierStartsWith: "ebay", - aliases: ["@ebay"], - default: { - // Not included anywhere. - }, - available: { - included: [ - { - // We don't currently enforce by region, but do locale instead. - // regions: [ - // "us", "gb", "ca", "ie", "fr", "it", "de", "at", "es", "nl", "ch", "au" - // ], - locales: [ - "an", - "ast", - "br", - "ca", - "ca-valencia", - "cy", - "de", - "dsb", - "en-CA", - "en-GB", - "es-ES", - "eu", - "fur", - "fr", - "fy-NL", - "ga-IE", - "gd", - "gl", - "hsb", - "it", - "lij", - "nl", - "rm", - "sc", - "wo", - ], - }, - { - regions: ["pl"], - }, - { - regions: ["au", "be", "ca", "ch", "gb", "ie", "nl", "us"], - locales: ["en-US"], - }, - { - regions: ["gb"], - locales: ["sco"], - }, - ], - }, - suggestionUrlBase: "https://autosug.ebay.com/autosug", - details: [ - { - // Note: These should be based on region, but we don't currently enforce that. - // Note: the order here is important. A region/locale match higher up in the - // list will override a region/locale match lower down. - domain: "www.befr.ebay.be", - telemetryId: "ebay-be", - included: [ - { - regions: ["be"], - locales: ["br", "unknown", "en-US", "fr", "fy-NL", "nl", "wo"], - }, - ], - excluded: [{ regions: ["pl"] }], - searchUrlCode: "mkrid=1553-53471-19255-0", - suggestUrlCode: "sId=23", - }, - { - domain: "www.ebay.at", - telemetryId: "ebay-at", - included: [ - { - regions: ["at"], - locales: ["de", "dsb", "hsb"], - }, - ], - excluded: [{ regions: ["pl"] }], - searchUrlCode: "mkrid=5221-53469-19255-0", - suggestUrlCode: "sId=16", - }, - { - domain: "www.ebay.ca", - telemetryId: "ebay-ca", - included: [ - { - locales: DOMAIN_LOCALES["ebay-ca"], - }, - { - regions: ["ca"], - }, - ], - excluded: [ - { - locales: [ - ...DOMAIN_LOCALES["ebay-ch"], - ...DOMAIN_LOCALES["ebay-de"], - ...DOMAIN_LOCALES["ebay-es"], - ...DOMAIN_LOCALES["ebay-ie"], - ...DOMAIN_LOCALES["ebay-it"], - ...DOMAIN_LOCALES["ebay-nl"], - ...DOMAIN_LOCALES["ebay-uk"], - ], - }, - { - regions: ["pl"], - }, - ], - searchUrlCode: "mkrid=706-53473-19255-0", - suggestUrlCode: "sId=2", - }, - { - domain: "www.ebay.ch", - telemetryId: "ebay-ch", - included: [ - { - locales: DOMAIN_LOCALES["ebay-ch"], - }, - { - regions: ["ch"], - }, - ], - excluded: [ - { - locales: [ - ...DOMAIN_LOCALES["ebay-ca"], - ...DOMAIN_LOCALES["ebay-es"], - ...DOMAIN_LOCALES["ebay-ie"], - ...DOMAIN_LOCALES["ebay-it"], - ...DOMAIN_LOCALES["ebay-nl"], - ...DOMAIN_LOCALES["ebay-uk"], - ], - }, - { - regions: ["pl"], - }, - ], - searchUrlCode: "mkrid=5222-53480-19255-0", - suggestUrlCode: "sId=193", - }, - { - domain: "www.ebay.com", - telemetryId: "ebay", - included: [ - { - locales: ["unknown", "en-US"], - }, - ], - excluded: [{ regions: ["au", "be", "ca", "ch", "gb", "ie", "nl", "pl"] }], - searchUrlCode: "mkrid=711-53200-19255-0", - suggestUrlCode: "sId=0", - }, - { - domain: "www.ebay.com.au", - telemetryId: "ebay-au", - included: [ - { - regions: ["au"], - locales: ["cy", "unknown", "en-GB", "en-US", "gd"], - }, - ], - excluded: [{ regions: ["pl"] }], - searchUrlCode: "mkrid=705-53470-19255-0", - suggestUrlCode: "sId=15", - }, - { - domain: "www.ebay.ie", - telemetryId: "ebay-ie", - included: [ - { - locales: DOMAIN_LOCALES["ebay-ie"], - }, - { - regions: ["ie"], - locales: ["cy", "unknown", "en-GB", "en-US", "gd"], - }, - ], - excluded: [{ regions: ["pl"] }], - searchUrlCode: "mkrid=5282-53468-19255-0", - suggestUrlCode: "sId=205", - }, - { - domain: "www.ebay.co.uk", - telemetryId: "ebay-uk", - included: [ - { - locales: DOMAIN_LOCALES["ebay-uk"], - }, - { - locales: ["unknown", "en-US", "sco"], - regions: ["gb"], - }, - ], - excluded: [{ regions: ["au", "ie", "pl"] }], - searchUrlCode: "mkrid=710-53481-19255-0", - suggestUrlCode: "sId=3", - }, - { - domain: "www.ebay.de", - telemetryId: "ebay-de", - included: [ - { - locales: DOMAIN_LOCALES["ebay-de"], - }, - ], - excluded: [{ regions: ["at", "ch", "pl"] }], - searchUrlCode: "mkrid=707-53477-19255-0", - suggestUrlCode: "sId=77", - }, - { - domain: "www.ebay.es", - telemetryId: "ebay-es", - included: [ - { - locales: DOMAIN_LOCALES["ebay-es"], - }, - ], - excluded: [{ regions: ["pl"] }], - searchUrlCode: "mkrid=1185-53479-19255-0", - suggestUrlCode: "sId=186", - }, - { - domain: "www.ebay.fr", - telemetryId: "ebay-fr", - included: [ - { - locales: ["br", "fr", "wo"], - }, - ], - excluded: [{ regions: ["be", "ca", "ch", "pl"] }], - searchUrlCode: "mkrid=709-53476-19255-0", - suggestUrlCode: "sId=71", - }, - { - domain: "www.ebay.it", - telemetryId: "ebay-it", - included: [ - { - locales: DOMAIN_LOCALES["ebay-it"], - }, - ], - excluded: [{ regions: ["pl"] }], - searchUrlCode: "mkrid=724-53478-19255-0", - suggestUrlCode: "sId=101", - }, - { - domain: "www.ebay.nl", - telemetryId: "ebay-nl", - included: [ - { - locales: DOMAIN_LOCALES["ebay-nl"], - }, - { - locales: ["unknown", "en-US"], - regions: ["nl"], - }, - ], - excluded: [{ regions: ["be", "pl"] }], - searchUrlCode: "mkrid=1346-53482-19255-0", - suggestUrlCode: "sId=146", - }, - { - domain: "www.ebay.pl", - telemetryId: "ebay-pl", - included: [ - { - regions: ["pl"], - }, - ], - searchUrlCode: "mkrid=4908-226936-19255-0", - suggestUrlCode: "sId=212", - }, - ], -}); - -add_setup(async function () { - await test.setup(); -}); - -add_task(async function test_searchConfig_ebay() { - await test.run(); -}); diff --git a/toolkit/components/search/tests/xpcshell/searchconfigs/test_searchconfig.js b/toolkit/components/search/tests/xpcshell/searchconfigs/test_searchconfig.js @@ -92,6 +92,17 @@ const WIKIPEDIA_LOCALES_INFO = [ [["zh-TW"], "zh", "zh-TW"], ]; +const EBAY_DOMAIN_LOCALES = { + "ebay-ca": ["en-CA"], + "ebay-ch": ["rm"], + "ebay-de": ["de", "dsb", "hsb"], + "ebay-es": ["an", "ast", "ca", "ca-valencia", "es-ES", "eu", "gl"], + "ebay-ie": ["ga-IE", "ie"], + "ebay-it": ["fur", "it", "lij", "sc"], + "ebay-nl": ["fy-NL", "nl"], + "ebay-uk": ["cy", "en-GB", "gd"], +}; + const wikipediaConfig = { identifierStartsWith: "wikipedia", default: { @@ -262,6 +273,286 @@ const test = new SearchConfigTest([ ], }, { + identifierStartsWith: "ebay", + aliases: ["@ebay"], + default: { + // Not included anywhere. + }, + available: { + included: [ + { + // We don't currently enforce by region, but do locale instead. + // regions: [ + // "us", "gb", "ca", "ie", "fr", "it", "de", "at", "es", "nl", "ch", "au" + // ], + locales: [ + "an", + "ast", + "br", + "ca", + "ca-valencia", + "cy", + "de", + "dsb", + "en-CA", + "en-GB", + "es-ES", + "eu", + "fur", + "fr", + "fy-NL", + "ga-IE", + "gd", + "gl", + "hsb", + "it", + "lij", + "nl", + "rm", + "sc", + "wo", + ], + }, + { + regions: ["pl"], + }, + { + regions: ["au", "be", "ca", "ch", "gb", "ie", "nl", "us"], + locales: ["en-US"], + }, + { + regions: ["gb"], + locales: ["sco"], + }, + ], + }, + suggestionUrlBase: "https://autosug.ebay.com/autosug", + details: [ + { + // Note: These should be based on region, but we don't currently enforce that. + // Note: the order here is important. A region/locale match higher up in the + // list will override a region/locale match lower down. + domain: "www.befr.ebay.be", + telemetryId: "ebay-be", + included: [ + { + regions: ["be"], + locales: ["br", "unknown", "en-US", "fr", "fy-NL", "nl", "wo"], + }, + ], + excluded: [{ regions: ["pl"] }], + searchUrlCode: "mkrid=1553-53471-19255-0", + suggestUrlCode: "sId=23", + }, + { + domain: "www.ebay.at", + telemetryId: "ebay-at", + included: [ + { + regions: ["at"], + locales: ["de", "dsb", "hsb"], + }, + ], + excluded: [{ regions: ["pl"] }], + searchUrlCode: "mkrid=5221-53469-19255-0", + suggestUrlCode: "sId=16", + }, + { + domain: "www.ebay.ca", + telemetryId: "ebay-ca", + included: [ + { + locales: EBAY_DOMAIN_LOCALES["ebay-ca"], + }, + { + regions: ["ca"], + }, + ], + excluded: [ + { + locales: [ + ...EBAY_DOMAIN_LOCALES["ebay-ch"], + ...EBAY_DOMAIN_LOCALES["ebay-de"], + ...EBAY_DOMAIN_LOCALES["ebay-es"], + ...EBAY_DOMAIN_LOCALES["ebay-ie"], + ...EBAY_DOMAIN_LOCALES["ebay-it"], + ...EBAY_DOMAIN_LOCALES["ebay-nl"], + ...EBAY_DOMAIN_LOCALES["ebay-uk"], + ], + }, + { + regions: ["pl"], + }, + ], + searchUrlCode: "mkrid=706-53473-19255-0", + suggestUrlCode: "sId=2", + }, + { + domain: "www.ebay.ch", + telemetryId: "ebay-ch", + included: [ + { + locales: EBAY_DOMAIN_LOCALES["ebay-ch"], + }, + { + regions: ["ch"], + }, + ], + excluded: [ + { + locales: [ + ...EBAY_DOMAIN_LOCALES["ebay-ca"], + ...EBAY_DOMAIN_LOCALES["ebay-es"], + ...EBAY_DOMAIN_LOCALES["ebay-ie"], + ...EBAY_DOMAIN_LOCALES["ebay-it"], + ...EBAY_DOMAIN_LOCALES["ebay-nl"], + ...EBAY_DOMAIN_LOCALES["ebay-uk"], + ], + }, + { + regions: ["pl"], + }, + ], + searchUrlCode: "mkrid=5222-53480-19255-0", + suggestUrlCode: "sId=193", + }, + { + domain: "www.ebay.com", + telemetryId: "ebay", + included: [ + { + locales: ["unknown", "en-US"], + }, + ], + excluded: [ + { regions: ["au", "be", "ca", "ch", "gb", "ie", "nl", "pl"] }, + ], + searchUrlCode: "mkrid=711-53200-19255-0", + suggestUrlCode: "sId=0", + }, + { + domain: "www.ebay.com.au", + telemetryId: "ebay-au", + included: [ + { + regions: ["au"], + locales: ["cy", "unknown", "en-GB", "en-US", "gd"], + }, + ], + excluded: [{ regions: ["pl"] }], + searchUrlCode: "mkrid=705-53470-19255-0", + suggestUrlCode: "sId=15", + }, + { + domain: "www.ebay.ie", + telemetryId: "ebay-ie", + included: [ + { + locales: EBAY_DOMAIN_LOCALES["ebay-ie"], + }, + { + regions: ["ie"], + locales: ["cy", "unknown", "en-GB", "en-US", "gd"], + }, + ], + excluded: [{ regions: ["pl"] }], + searchUrlCode: "mkrid=5282-53468-19255-0", + suggestUrlCode: "sId=205", + }, + { + domain: "www.ebay.co.uk", + telemetryId: "ebay-uk", + included: [ + { + locales: EBAY_DOMAIN_LOCALES["ebay-uk"], + }, + { + locales: ["unknown", "en-US", "sco"], + regions: ["gb"], + }, + ], + excluded: [{ regions: ["au", "ie", "pl"] }], + searchUrlCode: "mkrid=710-53481-19255-0", + suggestUrlCode: "sId=3", + }, + { + domain: "www.ebay.de", + telemetryId: "ebay-de", + included: [ + { + locales: EBAY_DOMAIN_LOCALES["ebay-de"], + }, + ], + excluded: [{ regions: ["at", "ch", "pl"] }], + searchUrlCode: "mkrid=707-53477-19255-0", + suggestUrlCode: "sId=77", + }, + { + domain: "www.ebay.es", + telemetryId: "ebay-es", + included: [ + { + locales: EBAY_DOMAIN_LOCALES["ebay-es"], + }, + ], + excluded: [{ regions: ["pl"] }], + searchUrlCode: "mkrid=1185-53479-19255-0", + suggestUrlCode: "sId=186", + }, + { + domain: "www.ebay.fr", + telemetryId: "ebay-fr", + included: [ + { + locales: ["br", "fr", "wo"], + }, + ], + excluded: [{ regions: ["be", "ca", "ch", "pl"] }], + searchUrlCode: "mkrid=709-53476-19255-0", + suggestUrlCode: "sId=71", + }, + { + domain: "www.ebay.it", + telemetryId: "ebay-it", + included: [ + { + locales: EBAY_DOMAIN_LOCALES["ebay-it"], + }, + ], + excluded: [{ regions: ["pl"] }], + searchUrlCode: "mkrid=724-53478-19255-0", + suggestUrlCode: "sId=101", + }, + { + domain: "www.ebay.nl", + telemetryId: "ebay-nl", + included: [ + { + locales: EBAY_DOMAIN_LOCALES["ebay-nl"], + }, + { + locales: ["unknown", "en-US"], + regions: ["nl"], + }, + ], + excluded: [{ regions: ["be", "pl"] }], + searchUrlCode: "mkrid=1346-53482-19255-0", + suggestUrlCode: "sId=146", + }, + { + domain: "www.ebay.pl", + telemetryId: "ebay-pl", + included: [ + { + regions: ["pl"], + }, + ], + searchUrlCode: "mkrid=4908-226936-19255-0", + suggestUrlCode: "sId=212", + }, + ], + }, + { identifier: "ecosia", aliases: [], default: { diff --git a/toolkit/components/search/tests/xpcshell/searchconfigs/xpcshell.toml b/toolkit/components/search/tests/xpcshell/searchconfigs/xpcshell.toml @@ -20,16 +20,6 @@ requesttimeoutfactor = 2 ["test_distributions.js"] -# The test_ebay needs newSearchConfig.enabled=true because there -# are changes to ebay and locale pl for search-config-v2. -# We have rolled out search-config-v2 100% to Beta 126 and the next Beta 127 -# will pick up newSearchConfig.enabled=true from Nimbus Settings but not -# immediately, we need to turn the PREF on for this test to prevent failures -# in the merge from central to Beta 127. - -["test_ebay.js"] -prefs = ["browser.search.newSearchConfig.enabled=true"] - ["test_google.js"] ["test_searchconfig.js"] diff --git a/toolkit/components/search/tests/xpcshell/xpcshell.toml b/toolkit/components/search/tests/xpcshell/xpcshell.toml @@ -24,16 +24,13 @@ tags = "searchmain" ["test_appDefaultEngine.js"] ["test_appProvided_engine.js"] -prefs = ["browser.search.newSearchConfig.enabled=true"] support-files = [ "../../schema/search-config-v2-schema.json", ] ["test_appProvided_icons.js"] -prefs = ["browser.search.newSearchConfig.enabled=true"] ["test_appProvided_icons_updates.js"] -prefs = ["browser.search.newSearchConfig.enabled=true"] tags = "remote-settings" ["test_async.js"] @@ -261,7 +258,6 @@ support-files = ["settings/v6-ids-upgrade.json"] support-files = ["settings/v7-loadPath-migration.json"] ["test_settings_migration_renames.js"] -prefs = ["browser.search.newSearchConfig.enabled=true"] support-files = ["settings/v6-migration-renames.json"] ["test_settings_none.js"]