[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-155.0a1-17.0-1] 21 commits: fixup! MB 419: Mullvad Browser migration procedures.



Title: GitLab

Pier Angelo Vendrame pushed to branch mullvad-browser-155.0a1-17.0-1 at The Tor Project / Applications / Mullvad Browser

Commits:

  • cabad3e9
    by Pier Angelo Vendrame at 2026-11-05T10:21:34+01:00
    fixup! MB 419: Mullvad Browser migration procedures.
    
    BB 45039: Make it easier to test ProfileDataUpgrader customization.
    
  • a71004d2
    by Pier Angelo Vendrame at 2026-11-05T10:21:35+01:00
    fixup! MB 38: Mullvad Browser configuration
    
    MB 537: Migrate from Mullvad to Quad9 DoH.
    
  • 34ac3c7d
    by Pier Angelo Vendrame at 2026-11-05T10:22:04+01:00
    fixup! MB 419: Mullvad Browser migration procedures.
    
    MB 537: Implement DoH migration.
    
  • 04792781
    by Henry Wilkes at 2026-11-05T10:22:06+01:00
    MB 538: Mullvad DoH discontinued notification.
    
  • a0be7fa1
    by Henry Wilkes at 2026-11-05T10:22:06+01:00
    fixup! Mullvad Browser strings
    
    MB 538: Strings for the DoH notification.
    
  • b7f8d167
    by Pier Angelo Vendrame at 2026-11-05T10:22:06+01:00
    MB 549: Customize the DoH preferences UI.
    
  • 484482fc
    by Pier Angelo Vendrame at 2026-11-05T10:22:07+01:00
    fixup! Mullvad Browser strings
    
    MB 549: Customize the DoH preferences UI.
    
  • e5d13d3c
    by Pier Angelo Vendrame at 2026-11-05T10:22:29+01:00
    fixup! MB 1: Mullvad Browser branding
    
    No issue: fix lint.
    
  • cb850735
    by Morgan at 2026-11-05T10:22:29+01:00
    fixup! Mullvad Browser strings
    
    No issue: fix typo
    
  • 1dddb11e
    by Pier Angelo Vendrame at 2026-11-05T10:22:30+01:00
    fixup! MB 1: Mullvad Browser branding
    
    MB 575: Remove an unused customization.
    
    That block is removed from about:license in a BB commit.
    
  • 55ba69e7
    by Pier Angelo Vendrame at 2026-11-05T10:23:02+01:00
    fixup! MB 38: Mullvad Browser configuration
    
    BB 45073: Part 1: Check tor-browser.js.
    
    We moved some common preferences that were defined both in
    000-tor-browser.js and 000-mullvad-browser.js in the common file to
    reduce redundancy.
    
  • acc88939
    by Morgan at 2026-11-05T10:23:02+01:00
    fixup! MB 1: Mullvad Browser branding
    
    MB 580: Migrate hiding feedbackPage menuitem to Mullvad Browser patchset
    
  • a7e4c717
    by Beatriz Rizental at 2026-11-05T10:23:14+01:00
    fixup! MB 1: Mullvad Browser branding
    
    Bug 569: Drop kitty image from default browser dialog
    
  • 915300ff
    by Beatriz Rizental at 2026-11-05T10:23:14+01:00
    fixup! MB 1: Mullvad Browser branding
    
    Bug 569: Use mullvad Browser logo in sidebar
    
  • 28013398
    by Morgan at 2026-11-05T10:23:14+01:00
    fixup! MB 1: Mullvad Browser branding
    
    switch hard-coded fill to 'context-fill' so firefox can colour the icon based on theme
    
  • bfe1d332
    by Morgan at 2026-11-05T10:23:19+01:00
    fixup! MB 538: Mullvad DoH discontinued notification.
    
    MB 581: change Review settings button to move user to about:preferences#dnsOverHttps rather than about:preferences#privacy
    
  • 2a86ab17
    by Beatriz Rizental at 2026-11-05T10:24:00+01:00
    fixup! MB 1: Mullvad Browser branding
    
    Bug 576: Fix home page name
    
  • afbb9b60
    by Beatriz Rizental at 2026-11-05T10:24:00+01:00
    fixup! MB 1: Mullvad Browser branding
    
    Bug 576: Fix home page name _correctly_
    
  • 68f6cf2c
    by Beatriz Rizental at 2026-11-05T10:24:01+01:00
    fixup! MB 1: Mullvad Browser branding
    
    This reverts commit ce60585f0d88eaef8d6eac4f063ae4032a6c8884.
    
  • 5569ad41
    by Beatriz Rizental at 2026-11-05T10:24:01+01:00
    fixup! MB 39: Add home page about:mullvad-browser
    
  • ab9b3977
    by hackademix at 2026-11-05T10:24:35+01:00
    fixup! MB 538: Mullvad DoH discontinued notification.
    
    MB 586: Stop leaking browser windows in mullvadDoHNotification.js
    

18 changed files:

Changes:

  • browser/app/profile/000-mullvad-browser.js
    ... ... @@ -11,12 +11,14 @@ pref("browser.base-browser-support-url", "https://mullvad.net/en/help/");
    11 11
     pref("browser.toolbars.bookmarks.visibility", "never");
    
    12 12
     
    
    13 13
     // mullvad-browser#19: Enable Mullvad's DOH
    
    14
    -pref("network.trr.uri", "https://dns.mullvad.net/dns-query");
    
    15
    -pref("network.trr.default_provider_uri", "https://dns.mullvad.net/dns-query");
    
    14
    +pref("network.trr.uri", "https://doh-mullvad.quad9.net/dns-query");
    
    15
    +pref("network.trr.default_provider_uri", "https://doh-mullvad.quad9.net/dns-query");
    
    16 16
     pref("network.trr.mode", 3);
    
    17
    -pref("doh-rollout.provider-list", "[{\"UIName\":\"Mullvad\",\"autoDefault\":true,\"canonicalName\":\"\",\"id\":\"mullvad\",\"last_modified\":0,\"schema\":0,\"uri\":\"https://dns.mullvad.net/dns-query\"},{\"UIName\":\"Mullvad (Ad-blocking)\",\"autoDefault\":false,\"canonicalName\":\"\",\"id\":\"mullvad\",\"last_modified\":0,\"schema\":0,\"uri\":\"https://adblock.dns.mullvad.net/dns-query\"}]");
    
    17
    +pref("doh-rollout.provider-list", "[{\"uri\":\"https://doh-mullvad.quad9.net/dns-query\",\"UIName\":\"Quad9 - no threat blocking\",\"schema\":0,\"autoDefault\":false,\"canonicalName\":\"\",\"id\":\"quad9-no-threat-blocking\",\"last_modified\":0},{\"uri\":\"https://dns.quad9.net/dns-query\",\"UIName\":\"Quad9 - secure: threat blocking\",\"schema\":0,\"autoDefault\":true,\"canonicalName\":\"\",\"id\":\"quad9-threat-blocking\",\"last_modified\":0}]");
    
    18 18
     // mullvad-browser#122: Audit DoH heuristics
    
    19 19
     pref("doh-rollout.disable-heuristics", true);
    
    20
    +// mullvad-browser#537: migrate users from Mullvad DoH service.
    
    21
    +pref("mullvadbrowser.migration.show_doh_notification", false);
    
    20 22
     
    
    21 23
     // mullvad-browser#87: Windows and Linux need additional work to make the
    
    22 24
     // default browser choice working.
    
    ... ... @@ -33,10 +35,8 @@ pref("privacy.spoof_english", 2);
    33 35
     pref("browser.tabs.tabmanager.enabled", false);
    
    34 36
     
    
    35 37
     // mullvad-browser#131: Review a few updater preferences
    
    36
    -pref("app.update.notifyDuringDownload", true);
    
    37 38
     pref("app.update.url.manual", "https://mullvad.net/download/browser");
    
    38 39
     pref("app.update.url.details", "https://mullvad.net/download/browser");
    
    39
    -pref("app.update.badgeWaitTime", 0);
    
    40 40
     // point to our feedback url rather than Mozilla's
    
    41 41
     pref("app.feedback.baseURL", "https://mullvad.net/help/tag/browser/");
    
    42 42
     
    

  • browser/base/content/browser-main.js
    ... ... @@ -31,6 +31,7 @@
    31 31
       Services.scriptloader.loadSubScript("chrome://browser/content/places/places-menupopup.js", this);
    
    32 32
       Services.scriptloader.loadSubScript("chrome://browser/content/search/autocomplete-popup.js", this);
    
    33 33
       Services.scriptloader.loadSubScript("chrome://browser/content/search/searchbar.js", this);
    
    34
    +  Services.scriptloader.loadSubScript("chrome://browser/content/mullvadDoHNotification.js", this);
    
    34 35
       Services.scriptloader.loadSubScript("chrome://browser/content/languageNotification.js", this);
    
    35 36
       if (AIWindow.isOpeningAIWindow(window)) {
    
    36 37
         ChromeUtils.importESModule("chrome://browser/content/urlbar/SmartbarInput.mjs", { global: "current" });
    

  • browser/base/content/browser-menubar.inc.xhtml
    ... ... @@ -468,6 +468,7 @@
    468 468
                               hidden="true"
    
    469 469
                               appmenu-data-l10n-id="appmenuitem-report-broken-site"/>
    
    470 470
                     <menuitem id="feedbackPage"
    
    471
    +                          hidden="true"
    
    471 472
                               data-l10n-id="menu-help-share-ideas"
    
    472 473
                               appmenu-data-l10n-id="appmenu-help-share-ideas"/>
    
    473 474
                     <menuitem id="helpSafeMode"
    

  • browser/base/content/browser.xhtml
    ... ... @@ -99,6 +99,7 @@
    99 99
       <link rel="localization" href="">"browser/syncedTabs.ftl"/>
    
    100 100
       <link rel="localization" href="">"browser/profiles.ftl"/>
    
    101 101
       <link rel="localization" href="">"toolkit/global/base-browser.ftl"/>
    
    102
    +  <link rel="localization" href="">"toolkit/global/mullvad-browser.ftl"/>
    
    102 103
       <!-- Untranslated FTL files -->
    
    103 104
       <link rel="localization" href="">"preview/credentialChooser.ftl" />
    
    104 105
       <link rel="localization" href="">"preview/enUS-searchFeatures.ftl" />
    

  • browser/base/content/mullvadDoHNotification.js
    1
    +"use strict";
    
    2
    +
    
    3
    +window.addEventListener("load", () => {
    
    4
    +  // A notification to let users known that their DNS over HTTPS settings have
    
    5
    +  // changed because the mullvad DoH services has been discontinued and
    
    6
    +  // replaced. tor-browser#538.
    
    7
    +  const notification = {
    
    8
    +    // ProfileDataUpgrader.upgradeMB migration will set the `showPref`
    
    9
    +    // preference conditionally on whether the user is effected. We wait for
    
    10
    +    // this preference for confirmation.
    
    11
    +    showPref: "mullvadbrowser.migration.show_doh_notification",
    
    12
    +    shown: false,
    
    13
    +
    
    14
    +    init() {
    
    15
    +      Services.prefs.addObserver(this.showPref, this);
    
    16
    +      window.addEventListener("unload", () => {
    
    17
    +        if (!this.shown) {
    
    18
    +          Services.prefs.removeObserver(this.showPref, this);
    
    19
    +        }
    
    20
    +      });
    
    21
    +      this.maybeShow();
    
    22
    +    },
    
    23
    +
    
    24
    +    observe() {
    
    25
    +      this.maybeShow();
    
    26
    +    },
    
    27
    +
    
    28
    +    async maybeShow() {
    
    29
    +      if (this.shown || !Services.prefs.getBoolPref(this.showPref, false)) {
    
    30
    +        return;
    
    31
    +      }
    
    32
    +      this.shown = true;
    
    33
    +      Services.prefs.removeObserver(this.showPref, this);
    
    34
    +
    
    35
    +      gNotificationBox.appendNotification(
    
    36
    +        "mullvad-doh-notification",
    
    37
    +        {
    
    38
    +          label: { "l10n-id": "mullvad-doh-notification-body" },
    
    39
    +          priority: gNotificationBox.PRIORITY_INFO_HIGH,
    
    40
    +          eventCallback: name => {
    
    41
    +            if (name === "dismissed") {
    
    42
    +              Services.prefs.clearUserPref(this.showPref);
    
    43
    +            }
    
    44
    +          },
    
    45
    +        },
    
    46
    +        [
    
    47
    +          {
    
    48
    +            "l10n-id": "moz-support-link-text",
    
    49
    +            link: "https://mullvad.net/en/blog/shutting-down-our-public-encrypted-dns-servers-and-sponsoring-quad9-instead",
    
    50
    +          },
    
    51
    +          {
    
    52
    +            "l10n-id": "mullvad-doh-notification-settings-button",
    
    53
    +            primary: true,
    
    54
    +            callback: () => {
    
    55
    +              window.openPreferences("dnsOverHttps");
    
    56
    +              Services.prefs.clearUserPref(this.showPref);
    
    57
    +              // Keep the notification open in case the user wants to click
    
    58
    +              // "Learn more".
    
    59
    +              return true;
    
    60
    +            },
    
    61
    +          },
    
    62
    +        ]
    
    63
    +      );
    
    64
    +    },
    
    65
    +  };
    
    66
    +  notification.init();
    
    67
    +});

  • browser/base/content/overrides/app-license.html
    ... ... @@ -3,7 +3,6 @@
    3 3
        - file, You can obtain one at http://mozilla.org/MPL/2.0/.  -->
    
    4 4
     <p>
    
    5 5
       <b>Binaries</b> of this product have been made available to you by the
    
    6
    -  <a href="">"https://www.torproject.org/">Tor Project</a> and
    
    7
    -  <a href="">"https://mullvad.net/">Mullvad VPN</a> under the Mozilla Public
    
    6
    +  <a href="">"http://www.mozilla.org/">Mozilla Project</a> under the Mozilla Public
    
    8 7
       License 2.0 (MPL). <a href="">"about:rights">Know your rights</a>.
    
    9 8
     </p>

  • browser/base/jar.mn
    ... ... @@ -102,4 +102,5 @@ browser.jar:
    102 102
             content/browser/spotlight.js                  (content/spotlight.js)
    
    103 103
     *       content/browser/default-bookmarks.html        (content/default-bookmarks.html)
    
    104 104
     
    
    105
    +        content/browser/mullvadDoHNotification.js     (content/mullvadDoHNotification.js)
    
    105 106
             content/browser/languageNotification.js       (content/languageNotification.js)

  • browser/components/ProfileDataUpgrader.sys.mjs
    ... ... @@ -1247,12 +1247,21 @@ export let ProfileDataUpgrader = {
    1247 1247
         Services.prefs.setIntPref(MIGRATION_PREF, MIGRATION_VERSION);
    
    1248 1248
       },
    
    1249 1249
     
    
    1250
    -  async upgradeMB(isNewProfile) {
    
    1250
    +  /**
    
    1251
    +   * Run the profile data migration for Tor Browser if needed.
    
    1252
    +   *
    
    1253
    +   * @param {boolean} isNewProfile When true, just set the migration version
    
    1254
    +   * without actually changing anything.
    
    1255
    +   * @param {number} [currentVersion] The version to migrating from. To be used
    
    1256
    +   * only by tests.
    
    1257
    +   */
    
    1258
    +  async upgradeMB(isNewProfile, currentVersion) {
    
    1251 1259
         // Version 1: Mullvad Browser 14.5a6: Clear home page update url preference
    
    1252 1260
         //            (mullvad-browser#411).
    
    1253 1261
         // Version 2: Mullvad Browser 15.0a2: Remove legacy search addons
    
    1254 1262
         //            (tor-browser#43111).
    
    1255
    -    const MB_MIGRATION_VERSION = 2;
    
    1263
    +    // Version 3: Mullvad Browser 16.0a12: DoH migration (mullvad-browser#537).
    
    1264
    +    const MB_MIGRATION_VERSION = 3;
    
    1256 1265
         const MIGRATION_PREF = "mullvadbrowser.migration.version";
    
    1257 1266
     
    
    1258 1267
         if (isNewProfile) {
    
    ... ... @@ -1265,11 +1274,14 @@ export let ProfileDataUpgrader = {
    1265 1274
           console.error("upgradeTB: isNewProfile is undefined.");
    
    1266 1275
         }
    
    1267 1276
     
    
    1268
    -    const currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
    
    1277
    +    if (currentVersion === undefined) {
    
    1278
    +      currentVersion = Services.prefs.getIntPref(MIGRATION_PREF, 0);
    
    1279
    +    }
    
    1269 1280
     
    
    1270 1281
         if (currentVersion < 1) {
    
    1271 1282
           Services.prefs.clearUserPref("mullvadbrowser.post_update.url");
    
    1272 1283
         }
    
    1284
    +
    
    1273 1285
         const dropAddons = async list => {
    
    1274 1286
           for (const id of list) {
    
    1275 1287
             try {
    
    ... ... @@ -1278,6 +1290,7 @@ export let ProfileDataUpgrader = {
    1278 1290
             } catch {}
    
    1279 1291
           }
    
    1280 1292
         };
    
    1293
    +
    
    1281 1294
         if (currentVersion < 2) {
    
    1282 1295
           await dropAddons([
    
    1283 1296
             "brave@xxxxxxxxxxxxxxxxxx",
    
    ... ... @@ -1290,6 +1303,36 @@ export let ProfileDataUpgrader = {
    1290 1303
           ]);
    
    1291 1304
         }
    
    1292 1305
     
    
    1306
    +    if (currentVersion < 3) {
    
    1307
    +      this.upgradeDoH();
    
    1308
    +    }
    
    1309
    +
    
    1293 1310
         Services.prefs.setIntPref(MIGRATION_PREF, MB_MIGRATION_VERSION);
    
    1294 1311
       },
    
    1312
    +
    
    1313
    +  upgradeDoH() {
    
    1314
    +    const DOH_NOTIFICATION_PREF =
    
    1315
    +      "mullvadbrowser.migration.show_doh_notification";
    
    1316
    +    const DOH_URI_PREF = "network.trr.uri";
    
    1317
    +    const DOH_MODE_PREF = "network.trr.mode";
    
    1318
    +    const MULLVAD_ADBLOCK_URL = "https://adblock.dns.mullvad.net/dns-query";
    
    1319
    +
    
    1320
    +    const dohMode = Services.prefs.getIntPref(DOH_MODE_PREF, -1);
    
    1321
    +    const usesAdBlock =
    
    1322
    +      Services.prefs.getStringPref(DOH_URI_PREF, "") === MULLVAD_ADBLOCK_URL;
    
    1323
    +    const usesCustomUri =
    
    1324
    +      Services.prefs.prefHasUserValue(DOH_URI_PREF) && !usesAdBlock;
    
    1325
    +    if (
    
    1326
    +      dohMode === Ci.nsIDNSService.MODE_TRROFF ||
    
    1327
    +      (dohMode === Ci.nsIDNSService.MODE_TRRONLY && usesCustomUri)
    
    1328
    +    ) {
    
    1329
    +      return;
    
    1330
    +    }
    
    1331
    +
    
    1332
    +    Services.prefs.setIntPref(DOH_MODE_PREF, Ci.nsIDNSService.MODE_TRRONLY);
    
    1333
    +    if (usesAdBlock) {
    
    1334
    +      Services.prefs.clearUserPref(DOH_URI_PREF);
    
    1335
    +    }
    
    1336
    +    Services.prefs.setBoolPref(DOH_NOTIFICATION_PREF, true);
    
    1337
    +  },
    
    1295 1338
     };

  • browser/components/preferences/config/privacy.mjs
    ... ... @@ -1146,15 +1146,10 @@ SettingGroupManager.registerGroups({
    1146 1146
             id: "dohRadioGroup",
    
    1147 1147
             control: "moz-radio-group",
    
    1148 1148
             options: [
    
    1149
    -          {
    
    1150
    -            id: "dohRadioDefault",
    
    1151
    -            value: "default",
    
    1152
    -            l10nId: "preferences-doh-radio-default",
    
    1153
    -          },
    
    1154 1149
               {
    
    1155 1150
                 id: "dohRadioCustom",
    
    1156 1151
                 value: "custom",
    
    1157
    -            l10nId: "preferences-doh-radio-custom",
    
    1152
    +            l10nId: "mullvad-preferences-doh-radio-always-on",
    
    1158 1153
                 items: [
    
    1159 1154
                   {
    
    1160 1155
                     id: "dohFallbackIfCustom",
    
    ... ... @@ -1175,7 +1170,7 @@ SettingGroupManager.registerGroups({
    1175 1170
               {
    
    1176 1171
                 id: "dohRadioOff",
    
    1177 1172
                 value: "off",
    
    1178
    -            l10nId: "preferences-doh-radio-off",
    
    1173
    +            l10nId: "mullvad-preferences-doh-radio-off",
    
    1179 1174
               },
    
    1180 1175
             ],
    
    1181 1176
           },
    
    ... ... @@ -3286,14 +3281,13 @@ Preferences.addSetting({
    3286 3281
       id: "dohModeBoxItem",
    
    3287 3282
       deps: ["dohMode"],
    
    3288 3283
       getControlConfig: (config, deps) => {
    
    3289
    -    let l10nId = "preferences-doh-overview-off";
    
    3284
    +    let l10nId = "mullvad-preferences-doh-overview-off";
    
    3290 3285
         if (deps.dohMode.value == Ci.nsIDNSService.MODE_NATIVEONLY) {
    
    3291 3286
           l10nId = "preferences-doh-overview-default";
    
    3292
    -    } else if (
    
    3293
    -      deps.dohMode.value == Ci.nsIDNSService.MODE_TRRFIRST ||
    
    3294
    -      deps.dohMode.value == Ci.nsIDNSService.MODE_TRRONLY
    
    3295
    -    ) {
    
    3287
    +    } else if (deps.dohMode.value == Ci.nsIDNSService.MODE_TRRFIRST) {
    
    3296 3288
           l10nId = "preferences-doh-overview-custom";
    
    3289
    +    } else if (deps.dohMode.value == Ci.nsIDNSService.MODE_TRRONLY) {
    
    3290
    +      l10nId = "mullvad-preferences-doh-overview-always-on";
    
    3297 3291
         }
    
    3298 3292
         return {
    
    3299 3293
           ...config,
    
    ... ... @@ -3504,6 +3498,7 @@ Preferences.addSetting({
    3504 3498
       // for the mismatch of control-to-pref.
    
    3505 3499
       deps: ["dohMode"],
    
    3506 3500
       disabled: ({ dohMode }) => dohMode.locked,
    
    3501
    +  visible: () => false,
    
    3507 3502
       onUserChange: val => {
    
    3508 3503
         if (val) {
    
    3509 3504
           Glean.securityDohSettings.modeChangedButton.record({
    

  • browser/components/preferences/main.js
    ... ... @@ -482,10 +482,6 @@ function createDefaultBrowserConfig({
    482 482
         id: "isDefaultPane",
    
    483 483
         l10nId: "is-default-browser-2",
    
    484 484
         control: "moz-promo",
    
    485
    -    controlAttrs: {
    
    486
    -      imagesrc: "chrome://global/skin/illustrations/kit-happy.svg",
    
    487
    -      imagedisplay: "cover",
    
    488
    -    },
    
    489 485
       };
    
    490 486
     
    
    491 487
       const isNotDefaultPane = {
    
    ... ... @@ -504,10 +500,6 @@ function createDefaultBrowserConfig({
    504 500
             },
    
    505 501
           },
    
    506 502
         ],
    
    507
    -    controlAttrs: {
    
    508
    -      imagesrc: "chrome://global/skin/illustrations/kit-concerned.svg",
    
    509
    -      imagedisplay: "cover",
    
    510
    -    },
    
    511 503
       };
    
    512 504
     
    
    513 505
       const items = includeIsDefaultPane
    

  • browser/components/tests/unit/test_profileDataUpgrade_mullvad_doh.js
    1
    +/* Any copyright is dedicated to the Public Domain.
    
    2
    +https://creativecommons.org/publicdomain/zero/1.0/ */
    
    3
    +
    
    4
    +"use strict";
    
    5
    +
    
    6
    +const { ProfileDataUpgrader } = ChromeUtils.importESModule(
    
    7
    +  "moz-src:///browser/components/ProfileDataUpgrader.sys.mjs"
    
    8
    +);
    
    9
    +
    
    10
    +const DOH_NOTIFICATION_PREF = "mullvadbrowser.migration.show_doh_notification";
    
    11
    +const DOH_URI_PREF = "network.trr.uri";
    
    12
    +const DOH_MODE_PREF = "network.trr.mode";
    
    13
    +const MULLVAD_ADBLOCK_URL = "https://adblock.dns.mullvad.net/dns-query";
    
    14
    +
    
    15
    +/**
    
    16
    + * Run a test case.
    
    17
    + *
    
    18
    + * The test takes for granted the final mode can be either off (only if it was
    
    19
    + * already) or TRR-only in all other cases.
    
    20
    + * The caller need to supply the expected outcomes for the other prefs.
    
    21
    + *
    
    22
    + * @param {number} mode The mode to set before the migration
    
    23
    + * @param {string?} oldUri The URI to set before the migration, or null to clear
    
    24
    + *   the related preference.
    
    25
    + * @param {string?} newUri The expected new value for the preference, or null if
    
    26
    + *   the preference should have its default value.
    
    27
    + * @param {boolean} showNotification The expected value for the preference that
    
    28
    + *   signals that the change notification should be shown to the UI.
    
    29
    + */
    
    30
    +async function runTest(mode, oldUri, newUri, showNotification) {
    
    31
    +  info(`Running test for mode ${mode} and old uri ${oldUri}.`);
    
    32
    +
    
    33
    +  Services.prefs.setIntPref(DOH_MODE_PREF, mode);
    
    34
    +  if (oldUri !== null) {
    
    35
    +    Services.prefs.setStringPref(DOH_URI_PREF, oldUri);
    
    36
    +  } else {
    
    37
    +    Services.prefs.clearUserPref(DOH_URI_PREF);
    
    38
    +  }
    
    39
    +  Services.prefs.clearUserPref(DOH_NOTIFICATION_PREF);
    
    40
    +
    
    41
    +  await ProfileDataUpgrader.upgradeMB(false, 2);
    
    42
    +
    
    43
    +  if (newUri) {
    
    44
    +    Assert.equal(Services.prefs.getStringPref(DOH_URI_PREF), newUri);
    
    45
    +  } else {
    
    46
    +    Assert.ok(
    
    47
    +      !Services.prefs.prefHasUserValue(DOH_URI_PREF),
    
    48
    +      "The migration was supposed to clear the custom URI and so it did."
    
    49
    +    );
    
    50
    +  }
    
    51
    +
    
    52
    +  if (mode === Ci.nsIDNSService.MODE_TRROFF) {
    
    53
    +    Assert.equal(
    
    54
    +      Services.prefs.getIntPref(DOH_MODE_PREF, -1),
    
    55
    +      Ci.nsIDNSService.MODE_TRROFF,
    
    56
    +      "The migration did not turn on DoH."
    
    57
    +    );
    
    58
    +  } else {
    
    59
    +    Assert.equal(
    
    60
    +      Services.prefs.getIntPref(DOH_MODE_PREF, -1),
    
    61
    +      Ci.nsIDNSService.MODE_TRRONLY,
    
    62
    +      "Regardless of the starting mode, after the migration we are on TRR-only."
    
    63
    +    );
    
    64
    +  }
    
    65
    +
    
    66
    +  Assert.equal(
    
    67
    +    Services.prefs.getBoolPref(DOH_NOTIFICATION_PREF, false),
    
    68
    +    showNotification,
    
    69
    +    `The value for ${DOH_NOTIFICATION_PREF} is correct after the migration`
    
    70
    +  );
    
    71
    +}
    
    72
    +
    
    73
    +add_task(async function test_default_uri() {
    
    74
    +  // Max protection (our default): inherits the URI change, so we need to show
    
    75
    +  // the notification.
    
    76
    +  await runTest(Ci.nsIDNSService.MODE_TRRONLY, null, null, true);
    
    77
    +  // We move default and increased protection to maximum protection, and they
    
    78
    +  // inherit the default URI: show the notification.
    
    79
    +  await runTest(Ci.nsIDNSService.MODE_NATIVEONLY, null, null, true);
    
    80
    +  await runTest(Ci.nsIDNSService.MODE_TRRFIRST, null, null, true);
    
    81
    +});
    
    82
    +
    
    83
    +add_task(async function test_mullvad_adblock() {
    
    84
    +  // Mullvad Adblock was retired, so move to the default URI with maximum
    
    85
    +  // protection. Show the notification.
    
    86
    +  // This option could be set only with TRR first and TRR only, so test only
    
    87
    +  // those.
    
    88
    +  await runTest(
    
    89
    +    Ci.nsIDNSService.MODE_TRRFIRST,
    
    90
    +    MULLVAD_ADBLOCK_URL,
    
    91
    +    null,
    
    92
    +    true
    
    93
    +  );
    
    94
    +  await runTest(Ci.nsIDNSService.MODE_TRRONLY, MULLVAD_ADBLOCK_URL, null, true);
    
    95
    +});
    
    96
    +
    
    97
    +add_task(async function test_custom_provider() {
    
    98
    +  const CUSTOM_URL = "https://example.org/dns";
    
    99
    +  // Custom provider + TRR-only: nothing should change, do not show the
    
    100
    +  // notification.
    
    101
    +  await runTest(Ci.nsIDNSService.MODE_TRRONLY, CUSTOM_URL, CUSTOM_URL, false);
    
    102
    +  // Custom provider but TRR-first: we change it to TRR-only, so we should show
    
    103
    +  // a notification.
    
    104
    +  await runTest(Ci.nsIDNSService.MODE_TRRFIRST, CUSTOM_URL, CUSTOM_URL, true);
    
    105
    +  // Firefox's "default" mode and off automatically reset the provider URI, so
    
    106
    +  // we do not test them here.
    
    107
    +});
    
    108
    +
    
    109
    +add_task(async function test_update_doh_disabled() {
    
    110
    +  // No DoH: the migration should not turn it on. I.e., no changes, therefore no
    
    111
    +  // notification as well.
    
    112
    +  // Firefox resets the URL to the default one from the UI, so test only the
    
    113
    +  // default URI case.
    
    114
    +  await runTest(Ci.nsIDNSService.MODE_TRROFF, null, null, false);
    
    115
    +});

  • browser/components/tests/unit/xpcshell.toml
    ... ... @@ -43,6 +43,9 @@ skip-if = [
    43 43
     
    
    44 44
     ["test_profileDataUpgrade_duplicateCookiePerms.js"]
    
    45 45
     
    
    46
    +["test_profileDataUpgrade_mullvad_doh.js"]
    
    47
    +tags = "mullvad-browser"
    
    48
    +
    
    46 49
     ["test_profileDataUpgrade_smartwindow.js"]
    
    47 50
     
    
    48 51
     ["test_profileDataUpgrade_smartwindow_semanticHistory.js"]
    

  • browser/extensions/newtab/lib/AboutPreferences.sys.mjs
    ... ... @@ -891,7 +891,7 @@ export class AboutPreferences {
    891 891
               options: [
    
    892 892
                 {
    
    893 893
                   value: "home",
    
    894
    -              l10nId: "home-mode-choice-default-fx-srd",
    
    894
    +              l10nId: "home-mode-choice-mullvad",
    
    895 895
                 },
    
    896 896
                 { value: "blank", l10nId: "home-mode-choice-blank-srd" },
    
    897 897
                 { value: "custom", l10nId: "home-mode-choice-custom-srd" },
    
    ... ... @@ -911,7 +911,7 @@ export class AboutPreferences {
    911 911
               options: [
    
    912 912
                 {
    
    913 913
                   value: "home",
    
    914
    -              l10nId: "home-mode-choice-default-fx-srd",
    
    914
    +              l10nId: "home-mode-choice-mullvad",
    
    915 915
                 },
    
    916 916
                 { value: "blank", l10nId: "home-mode-choice-blank-srd" },
    
    917 917
               ],
    

  • browser/themes/shared/sidebar/firefox.svg
    1 1
     <!-- This Source Code Form is subject to the terms of the Mozilla Public
    
    2 2
        - License, v. 2.0. If a copy of the MPL was not distributed with this
    
    3 3
        - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
    
    4
    -<svg width="26" height="26" viewBox="0 0 26 26" fill="context-fill" xmlns="http://www.w3.org/2000/svg">
    
    5
    -  <path d="M24.3095 8.8538C23.7791 7.57797 22.7049 6.20058 21.8613 5.76523C22.5478 7.11119 22.9452 8.46136 23.097 9.46901C23.097 9.47099 23.0978 9.47592 23.0994 9.48932C21.7194 6.04976 19.3795 4.66282 17.4687 1.64296C17.3723 1.49026 17.2755 1.33716 17.1813 1.17577C17.1333 1.09335 17.0885 1.00913 17.0469 0.923289C16.9675 0.770024 16.9063 0.60802 16.8645 0.440563C16.8647 0.432635 16.8621 0.424884 16.8569 0.418833C16.8518 0.412782 16.8446 0.408868 16.8367 0.40786C16.8292 0.405713 16.8213 0.405713 16.8138 0.40786C16.8121 0.408469 16.8096 0.410449 16.8077 0.41116C16.805 0.412227 16.8016 0.414664 16.7988 0.416238C16.8002 0.41441 16.803 0.410297 16.8039 0.409332C13.7382 2.20475 12.6982 5.5261 12.6026 7.18782C12.7448 7.17797 12.8866 7.16603 13.0313 7.16603C15.3192 7.16603 17.3117 8.42388 18.3786 10.2883C17.727 9.83052 16.5601 9.37842 15.436 9.57393C19.8256 11.7684 18.6471 19.3252 12.5646 19.04C12.0229 19.0179 11.4876 18.9146 10.9766 18.7337C10.8557 18.6882 10.7362 18.6394 10.6181 18.5871C10.5492 18.5558 10.4804 18.524 10.4124 18.4889C10.4149 18.4906 10.4182 18.4924 10.4207 18.494C10.3611 18.4653 10.3018 18.4358 10.243 18.4054C10.3001 18.4327 10.3537 18.4625 10.4123 18.4887C8.92186 17.7184 7.69123 16.2628 7.53751 14.4951C7.53751 14.4951 8.10083 12.396 11.5712 12.396C11.9463 12.396 13.0189 11.3492 13.0387 11.0456C13.0342 10.9465 10.9101 10.1016 10.0821 9.28574C9.63965 8.84984 9.42957 8.63965 9.24351 8.48198C9.14257 8.39672 9.03704 8.31704 8.92739 8.2433C8.64923 7.27013 8.63741 6.24012 8.89317 5.26082C7.63948 5.83165 6.66438 6.73398 5.95547 7.53074H5.94984C5.46604 6.91796 5.50017 4.89657 5.52774 4.47452C5.52195 4.44837 5.16684 4.65886 5.12032 4.6906C4.69341 4.99532 4.29431 5.33723 3.92768 5.71232C3.51059 6.13547 3.12951 6.59266 2.7884 7.07915C2.7884 7.07975 2.78804 7.08047 2.78784 7.08107C2.78784 7.08041 2.7882 7.07975 2.7884 7.07915C2.00364 8.19123 1.44707 9.44781 1.15086 10.7763C1.14502 10.8027 1.14009 10.8302 1.1344 10.8568C1.11145 10.9643 1.00816 11.5095 0.993738 11.6265C0.992621 11.6354 0.994805 11.6175 0.993738 11.6265C0.899547 12.1899 0.839448 12.7585 0.81377 13.3291C0.81377 13.35 0.8125 13.3706 0.8125 13.3915C0.8125 20.1305 6.27656 25.5937 13.0165 25.5937C19.0526 25.5937 24.0644 21.2119 25.0456 15.4562C25.0663 15.3 25.0828 15.143 25.1011 14.9854C25.3437 12.8927 25.0742 10.6931 24.3095 8.8538ZM23.0989 9.48049C23.0995 9.48481 23.1002 9.48932 23.1009 9.49364L23.1005 9.49232L23.0989 9.48049Z"/>
    
    4
    +<svg width="26" height="26" viewBox="0 0 80 80" fill="context-fill" xmlns="http://www.w3.org/2000/svg" >
    
    5
    +  <path fill-rule="evenodd" clip-rule="evenodd" d="M13.125 8.125C10.3636 8.125 8.125 10.3636 8.125 13.125V66.875C8.125 69.6364 10.3636 71.875 13.125 71.875H66.875C69.6364 71.875 71.875 69.6364 71.875 66.875V13.125C71.875 10.3636 69.6364 8.125 66.875 8.125H13.125ZM17.5 16.875H27L40 41.5L53 16.875H62.5V63.75H53V39.25L46.5 51.625H33.5L27 39.25V63.75H17.5V16.875Z" />
    
    6 6
     </svg>

  • toolkit/components/aboutpdf/content/aboutPDF.html
    ... ... @@ -68,11 +68,7 @@
    68 68
               hidden
    
    69 69
             />
    
    70 70
             <div id="promo-row">
    
    71
    -          <moz-promo
    
    72
    -            id="promo"
    
    73
    -            hidden
    
    74
    -            data-l10n-id="about-pdf-promo"
    
    75
    -          >
    
    71
    +          <moz-promo id="promo" hidden data-l10n-id="about-pdf-promo">
    
    76 72
                 <moz-button
    
    77 73
                   id="set-default"
    
    78 74
                   slot="actions"
    

  • toolkit/content/widgets/moz-promo/moz-promo.css
    ... ... @@ -190,6 +190,7 @@
    190 190
       word-break: break-word;
    
    191 191
       margin: 0;
    
    192 192
       align-items: center;
    
    193
    +  justify-content: space-between;
    
    193 194
     
    
    194 195
       /* stylelint-disable-next-line stylelint-plugin-mozilla/no-has-selector */
    
    195 196
       &:has(slot:has-slotted) {
    

  • toolkit/content/widgets/moz-promo/moz-promo.tokens.css
    ... ... @@ -23,7 +23,7 @@
    23 23
         --promo-image-size-large: calc(2 * var(--size-image-xlarge));
    
    24 24
         --promo-message-text-color: var(--text-color);
    
    25 25
         --promo-message-text-color-vibrant: light-dark(var(--color-violet-80), var(--color-violet-0));
    
    26
    -    --promo-padding: var(--space-medium);
    
    26
    +    --promo-padding: var(--space-medium) var(--space-xlarge);
    
    27 27
       }
    
    28 28
     }
    
    29 29
     
    

  • toolkit/locales/en-US/toolkit/global/mullvad-browser.ftl
    ... ... @@ -32,3 +32,26 @@ home-mode-choice-mullvad =
    32 32
     
    
    33 33
     telemetry-title = Telemetry Information
    
    34 34
     telemetry-description = Telemetry is disabled in { -brand-short-name }.
    
    35
    +
    
    36
    +## DNS over HTTPS settings customization.
    
    37
    +
    
    38
    +mullvad-preferences-doh-overview-always-on =
    
    39
    +    .label = Always on
    
    40
    +    .description = Always use secure DNS.
    
    41
    +mullvad-preferences-doh-overview-off =
    
    42
    +    .label = Off
    
    43
    +    .description = Use your default DNS resolver.
    
    44
    +mullvad-preferences-doh-radio-always-on =
    
    45
    +    .label = Always on
    
    46
    +    .description = Always use secure DNS
    
    47
    +mullvad-preferences-doh-radio-off =
    
    48
    +    .label = Off (recommended when using a VPN)
    
    49
    +    .description = Use your default DNS resolver
    
    50
    +
    
    51
    +## DNS over HTTPS provider changed notification.
    
    52
    +
    
    53
    +# The first sentence should be wrapped in '<strong>' and '</strong>'.
    
    54
    +# "Mullvad" is an organization name.
    
    55
    +mullvad-doh-notification-body = <strong>Your default DNS Over HTTPS settings have been changed.</strong> Mullvad secure DNS service is being discontinued.
    
    56
    +mullvad-doh-notification-settings-button =
    
    57
    +    .label = Review settings

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx