Pier Angelo Vendrame pushed to branch base-browser-140.5.0esr-15.0-1 at The Tor Project / Applications / Tor Browser

Commits:

3 changed files:

Changes:

  • toolkit/components/search/content/base-browser-search-engine-icons.json
    ... ... @@ -2,6 +2,9 @@
    2 2
       "ddg": [
    
    3 3
         { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
    
    4 4
       ],
    
    5
    +  "ddg-noai": [
    
    6
    +    { "url": "chrome://global/content/search/duckduckgo.ico", "imageSize": 32 }
    
    7
    +  ],
    
    5 8
       "startpage": [
    
    6 9
         {
    
    7 10
           "url": "chrome://global/content/search/startpage-16.png",
    

  • toolkit/components/search/content/base-browser-search-engines.json
    ... ... @@ -17,6 +17,24 @@
    17 17
         "recordType": "engine",
    
    18 18
         "variants": [{ "environment": { "allRegionsAndLocales": true } }]
    
    19 19
       },
    
    20
    +  {
    
    21
    +    "base": {
    
    22
    +      "aliases": ["ddgnoai"],
    
    23
    +      "classification": "general",
    
    24
    +      "name": "DuckDuckGo (no AI)",
    
    25
    +      "urls": {
    
    26
    +        "search": {
    
    27
    +          "base": "https://noai.duckduckgo.com/",
    
    28
    +          "params": [],
    
    29
    +          "searchTermParamName": "q"
    
    30
    +        }
    
    31
    +      }
    
    32
    +    },
    
    33
    +    "id": "91687f02-56dd-4fef-ba26-bf139dff3166",
    
    34
    +    "identifier": "ddg-noai",
    
    35
    +    "recordType": "engine",
    
    36
    +    "variants": [{ "environment": { "allRegionsAndLocales": true } }]
    
    37
    +  },
    
    20 38
       {
    
    21 39
         "base": {
    
    22 40
           "aliases": ["startpage", "sp"],
    
    ... ... @@ -39,5 +57,18 @@
    39 57
         "recordType": "defaultEngines",
    
    40 58
         "globalDefault": "ddg",
    
    41 59
         "globalDefaultPrivate": "ddg"
    
    60
    +  },
    
    61
    +  {
    
    62
    +    "recordType": "engineOrders",
    
    63
    +    "orders": [
    
    64
    +      {
    
    65
    +        "environment": { "allRegionsAndLocales": true },
    
    66
    +        "order": [
    
    67
    +          "ddg",
    
    68
    +          "ddg-noai",
    
    69
    +          "startpage"
    
    70
    +        ]
    
    71
    +      }
    
    72
    +    ]
    
    42 73
       }
    
    43 74
     ]

  • toolkit/components/search/tests/xpcshell/test_base_browser.js
    ... ... @@ -4,12 +4,15 @@
    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 14
       ddg: "https://duckduckgo.com/?q=test",
    
    15
    +  "ddg-noai": "https://noai.duckduckgo.com/?q=test",
    
    13 16
       startpage: "https://www.startpage.com/sp/search?q=test",
    
    14 17
     };
    
    15 18
     const defaultEngine = "ddg";
    
    ... ... @@ -45,3 +48,11 @@ add_task(function test_checkSearchURLs() {
    45 48
         Assert.equal(foundUrl, url, `The URL of ${engine.name} is not altered.`);
    
    46 49
       }
    
    47 50
     });
    
    51
    +
    
    52
    +add_task(async function test_iconsDoesNotFail() {
    
    53
    +  for (const id of Object.keys(expectedURLs)) {
    
    54
    +    const engine = Services.search.getEngineById(id);
    
    55
    +    // No need to assert anything, as in case of error this method should throw.
    
    56
    +    await engine.getIconURL();
    
    57
    +  }
    
    58
    +});