[tbb-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.
morgan (@morgan)
git at gitlab.torproject.org
Thu Oct 10 21:17:26 UTC 2024
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:
- toolkit/mozapps/update/tests/data/sharedUpdateXML.js
- + toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
- toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml
Changes:
=====================================
toolkit/mozapps/update/tests/data/sharedUpdateXML.js
=====================================
@@ -141,6 +141,7 @@ function getRemoteUpdateString(aUpdateProps, aPatches) {
name: "App Update Test",
promptWaitTime: null,
type: "major",
+ unsupported: false,
};
for (let name in aUpdateProps) {
@@ -346,6 +347,7 @@ function getUpdateString(aUpdateProps) {
aUpdateProps.disableBackgroundUpdates +
'" '
: "";
+ let unsupported = aUpdateProps.unsupported ? 'unsupported="true" ' : "";
let custom1 = aUpdateProps.custom1 ? aUpdateProps.custom1 + " " : "";
let custom2 = aUpdateProps.custom2 ? aUpdateProps.custom2 + " " : "";
let buildID = 'buildID="' + aUpdateProps.buildID + '"';
@@ -360,6 +362,7 @@ function getUpdateString(aUpdateProps) {
promptWaitTime +
disableBITS +
disableBackgroundUpdates +
+ unsupported +
custom1 +
custom2 +
buildID
=====================================
toolkit/mozapps/update/tests/unit_aus_update/mixedUnsupported.js
=====================================
@@ -0,0 +1,50 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/**
+ * This tests that an older update is chosen over a more recent but unsupported
+ * update.
+ */
+
+async function run_test() {
+ setupTestCommon();
+ start_httpserver();
+ setUpdateURL(gURLData + gHTTPHandlerPath);
+ setUpdateChannel("test_channel");
+
+ let patchProps = {
+ type: "complete",
+ url: "http://complete/",
+ size: "9856459",
+ };
+ let patches = getRemotePatchString(patchProps);
+ patchProps = { type: "partial", url: "http://partial/", size: "1316138" };
+ patches += getRemotePatchString(patchProps);
+
+ let oldAppVersion = "900000.0";
+ let newAppVersion = "999999.0";
+ let update1 = getRemoteUpdateString(
+ { appVersion: newAppVersion, unsupported: true },
+ patches
+ );
+ let update2 = getRemoteUpdateString({ appVersion: oldAppVersion }, patches);
+ gResponseBody = getRemoteUpdatesXMLString(update1 + update2);
+
+ let checkResult = await waitForUpdateCheck(true, { updateCount: 2 });
+ let bestUpdate = await gAUS.selectUpdate(checkResult.updates);
+ bestUpdate.QueryInterface(Ci.nsIWritablePropertyBag);
+ Assert.equal(
+ bestUpdate.unsupported,
+ false,
+ "The unsupported update has been discarded."
+ );
+ Assert.equal(
+ bestUpdate.appVersion,
+ oldAppVersion,
+ "Expected the older version to be chosen over the more recent but unsupported."
+ );
+
+ stop_httpserver(doTestFinish);
+}
=====================================
toolkit/mozapps/update/tests/unit_aus_update/xpcshell.toml
=====================================
@@ -56,6 +56,8 @@ reason = "Feature is Firefox-specific and Windows-specific."
["languagePackUpdates.js"]
skip-if = ["socketprocess_networking"] # Bug 1759035
+["mixedUnsupported.js"]
+
["multiUpdate.js"]
skip-if = ["socketprocess_networking"] # Bug 1759035
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/be3bc0554ba2d322e2d7d308e01e41ee264248dc...2a2f50ebed8d4b9a479e0a437987435bc4e24939
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/compare/be3bc0554ba2d322e2d7d308e01e41ee264248dc...2a2f50ebed8d4b9a479e0a437987435bc4e24939
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20241010/eaf688bd/attachment-0001.htm>
More information about the tbb-commits
mailing list