diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /toolkit/mozapps/extensions/test/xpcshell/test_update.js | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpcshell/test_update.js')
-rw-r--r-- | toolkit/mozapps/extensions/test/xpcshell/test_update.js | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_update.js b/toolkit/mozapps/extensions/test/xpcshell/test_update.js index 1bd41e8d71..708b9de264 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_update.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_update.js @@ -595,25 +595,22 @@ add_task(async function test_params() { let resultsPromise = new Promise(resolve => { let results = new Map(); - testserver.registerPathHandler( - "/data/param_test.json", - function (request, response) { - let params = new URLSearchParams(request.queryString); - let itemId = params.get("item_id"); - ok( - !results.has(itemId), - `Should not see a duplicate request for item ${itemId}` - ); - - results.set(itemId, params); - - if (results.size === PARAM_IDS.length) { - resolve(results); - } - - request.setStatusLine(null, 500, "Server Error"); + testserver.registerPathHandler("/data/param_test.json", function (request) { + let params = new URLSearchParams(request.queryString); + let itemId = params.get("item_id"); + ok( + !results.has(itemId), + `Should not see a duplicate request for item ${itemId}` + ); + + results.set(itemId, params); + + if (results.size === PARAM_IDS.length) { + resolve(results); } - ); + + request.setStatusLine(null, 500, "Server Error"); + }); }); let addons = await getAddons(PARAM_IDS); @@ -746,11 +743,11 @@ add_task(async function test_no_auto_update() { equal(aInstall.existingAddon.id, "addon1@tests.mozilla.org"); }, - onDownloadFailed(aInstall) { + onDownloadFailed() { ok(false, "Should not have seen onDownloadFailed event"); }, - onDownloadCancelled(aInstall) { + onDownloadCancelled() { ok(false, "Should not have seen onDownloadCancelled event"); }, @@ -764,11 +761,11 @@ add_task(async function test_no_auto_update() { resolve(); }, - onInstallFailed(aInstall) { + onInstallFailed() { ok(false, "Should not have seen onInstallFailed event"); }, - onInstallCancelled(aInstall) { + onInstallCancelled() { ok(false, "Should not have seen onInstallCancelled event"); }, }; |