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

[tor-commits] [Git][tpo/applications/mullvad-browser][mullvad-browser-128.3.0esr-14.0-1] 2 commits: dropme! Bug 4234: Use the Firefox Update Process for Base Browser.



Title: GitLab

morgan pushed to branch mullvad-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser

Commits:

  • bc8fd871
    by Pier Angelo Vendrame at 2024-10-10T21:13:43+00:00
    dropme! Bug 4234: Use the Firefox Update Process for Base Browser.
    
    This commit is not for rebase.
    
    Revert "fixup! Bug 4234: Use the Firefox Update Process for Base Browser."
    
    This reverts commit af856ef0e56959a57baa0056916b84e02eaf4c67.
    
  • 2a2f50eb
    by Pier Angelo Vendrame at 2024-10-10T21:13:44+00:00
    Bug 1923264 - Discard unsupported updates in selectUpdate. r=bytesized,nalexander
    
    UpdateService.#selectUpdate currently chooses always the most recent
    update even when unsupported and an older but supported one is
    available.
    This commit makes #selectUpdate discard the unsupported update if a
    supported alternative is found.
    
    Differential Revision: https://phabricator.services.mozilla.com/D224905

3 changed files:

Changes:

  • toolkit/mozapps/update/tests/data/sharedUpdateXML.js
    ... ... @@ -141,6 +141,7 @@ function getRemoteUpdateString(aUpdateProps, aPatches) {
    141 141
         name: "App Update Test",
    
    142 142
         promptWaitTime: null,
    
    143 143
         type: "major",
    
    144
    +    unsupported: false,
    
    144 145
       };
    
    145 146
     
    
    146 147
       for (let name in aUpdateProps) {
    
    ... ... @@ -346,6 +347,7 @@ function getUpdateString(aUpdateProps) {
    346 347
           aUpdateProps.disableBackgroundUpdates +
    
    347 348
           '" '
    
    348 349
         : "";
    
    350
    +  let unsupported = aUpdateProps.unsupported ? 'unsupported="true" ' : "";
    
    349 351
       let custom1 = aUpdateProps.custom1 ? aUpdateProps.custom1 + " " : "";
    
    350 352
       let custom2 = aUpdateProps.custom2 ? aUpdateProps.custom2 + " " : "";
    
    351 353
       let buildID = 'buildID="' + aUpdateProps.buildID + '"';
    
    ... ... @@ -360,6 +362,7 @@ function getUpdateString(aUpdateProps) {
    360 362
         promptWaitTime +
    
    361 363
         disableBITS +
    
    362 364
         disableBackgroundUpdates +
    
    365
    +    unsupported +
    
    363 366
         custom1 +
    
    364 367
         custom2 +
    
    365 368
         buildID
    

  • toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
    1
    +/* This Source Code Form is subject to the terms of the Mozilla Public
    
    2
    + * License, v. 2.0. If a copy of the MPL was not distributed with this
    
    3
    + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    
    4
    + */
    
    5
    +
    
    6
    +/**
    
    7
    + * This tests that an older update is chosen over a more recent but unsupported
    
    8
    + * update.
    
    9
    + */
    
    10
    +
    
    11
    +async function run_test() {
    
    12
    +  setupTestCommon();
    
    13
    +  start_httpserver();
    
    14
    +  setUpdateURL(gURLData + gHTTPHandlerPath);
    
    15
    +  setUpdateChannel("test_channel");
    
    16
    +
    
    17
    +  let patchProps = {
    
    18
    +    type: "complete",
    
    19
    +    url: "http://complete/",
    
    20
    +    size: "9856459",
    
    21
    +  };
    
    22
    +  let patches = getRemotePatchString(patchProps);
    
    23
    +  patchProps = { type: "partial", url: "http://partial/", size: "1316138" };
    
    24
    +  patches += getRemotePatchString(patchProps);
    
    25
    +
    
    26
    +  let oldAppVersion = "900000.0";
    
    27
    +  let newAppVersion = "999999.0";
    
    28
    +  let update1 = getRemoteUpdateString(
    
    29
    +    { appVersion: newAppVersion, unsupported: true },
    
    30
    +    patches
    
    31
    +  );
    
    32
    +  let update2 = getRemoteUpdateString({ appVersion: oldAppVersion }, patches);
    
    33
    +  gResponseBody = getRemoteUpdatesXMLString(update1 + update2);
    
    34
    +
    
    35
    +  let checkResult = await waitForUpdateCheck(true, { updateCount: 2 });
    
    36
    +  let bestUpdate = await gAUS.selectUpdate(checkResult.updates);
    
    37
    +  bestUpdate.QueryInterface(Ci.nsIWritablePropertyBag);
    
    38
    +  Assert.equal(
    
    39
    +    bestUpdate.unsupported,
    
    40
    +    false,
    
    41
    +    "The unsupported update has been discarded."
    
    42
    +  );
    
    43
    +  Assert.equal(
    
    44
    +    bestUpdate.appVersion,
    
    45
    +    oldAppVersion,
    
    46
    +    "Expected the older version to be chosen over the more recent but unsupported."
    
    47
    +  );
    
    48
    +
    
    49
    +  stop_httpserver(doTestFinish);
    
    50
    +}

  • toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml
    ... ... @@ -56,6 +56,8 @@ reason = "Feature is Firefox-specific and Windows-specific."
    56 56
     ["languagePackUpdates.js"]
    
    57 57
     skip-if = ["socketprocess_networking"] # Bug 1759035
    
    58 58
     
    
    59
    +["mixedUnsupported.js"]
    
    60
    +
    
    59 61
     ["multiUpdate.js"]
    
    60 62
     skip-if = ["socketprocess_networking"] # Bug 1759035
    
    61 63
     
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits