summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/update/tests
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps/update/tests')
-rw-r--r--toolkit/mozapps/update/tests/browser/browser_elevationDialog.js4
-rw-r--r--toolkit/mozapps/update/tests/browser/head.js2
-rw-r--r--toolkit/mozapps/update/tests/data/app_update.sjs4
-rw-r--r--toolkit/mozapps/update/tests/data/shared.js2
-rw-r--r--toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js14
-rw-r--r--toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py4
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js6
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js10
-rw-r--r--toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js4
-rw-r--r--toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js6
10 files changed, 29 insertions, 27 deletions
diff --git a/toolkit/mozapps/update/tests/browser/browser_elevationDialog.js b/toolkit/mozapps/update/tests/browser/browser_elevationDialog.js
index 6aa32a7fc9..639af1ffff 100644
--- a/toolkit/mozapps/update/tests/browser/browser_elevationDialog.js
+++ b/toolkit/mozapps/update/tests/browser/browser_elevationDialog.js
@@ -13,7 +13,7 @@ add_task(async function elevation_dialog() {
let { startup } = Services;
let appStartup = {
QueryInterface: ChromeUtils.generateQI(["nsIAppStartup"]),
- quit(mode) {
+ quit(_mode) {
if (elevationDialog) {
elevationDialog.close();
elevationDialog = null;
@@ -120,7 +120,7 @@ function waitForElevationDialog() {
var domwindow = aXULWindow.docShell.domWindow;
domwindow.addEventListener("load", elevationDialogOnLoad, true);
},
- onCloseWindow: aXULWindow => {},
+ onCloseWindow: _aXULWindow => {},
};
Services.wm.addListener(listener);
diff --git a/toolkit/mozapps/update/tests/browser/head.js b/toolkit/mozapps/update/tests/browser/head.js
index a18a72e581..c5acdad8e4 100644
--- a/toolkit/mozapps/update/tests/browser/head.js
+++ b/toolkit/mozapps/update/tests/browser/head.js
@@ -487,7 +487,7 @@ function waitForAboutDialog() {
var domwindow = aXULWindow.docShell.domWindow;
domwindow.addEventListener("load", aboutDialogOnLoad, true);
},
- onCloseWindow: aXULWindow => {},
+ onCloseWindow: _aXULWindow => {},
};
Services.wm.addListener(listener);
diff --git a/toolkit/mozapps/update/tests/data/app_update.sjs b/toolkit/mozapps/update/tests/data/app_update.sjs
index 2081118547..1d5d23bfb5 100644
--- a/toolkit/mozapps/update/tests/data/app_update.sjs
+++ b/toolkit/mozapps/update/tests/data/app_update.sjs
@@ -79,7 +79,7 @@ function handleRequest(aRequest, aResponse) {
let retries = 0;
gSlowDownloadTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
gSlowDownloadTimer.initWithCallback(
- function (aTimer) {
+ function (_aTimer) {
let continueFile = getTestDataFile(CONTINUE_DOWNLOAD);
retries++;
if (continueFile.exists() || retries == MAX_SLOW_RESPONSE_RETRIES) {
@@ -197,7 +197,7 @@ function respond(aResponse, aParams, aResponseString) {
aResponse.processAsync();
gSlowCheckTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
gSlowCheckTimer.initWithCallback(
- function (aTimer) {
+ function (_aTimer) {
retries++;
let continueFile = getTestDataFile(CONTINUE_CHECK);
if (continueFile.exists() || retries == MAX_SLOW_RESPONSE_RETRIES) {
diff --git a/toolkit/mozapps/update/tests/data/shared.js b/toolkit/mozapps/update/tests/data/shared.js
index fc3d358586..60de6feeb8 100644
--- a/toolkit/mozapps/update/tests/data/shared.js
+++ b/toolkit/mozapps/update/tests/data/shared.js
@@ -922,7 +922,7 @@ async function continueFileHandler(leafName) {
"Waiting for file to be deleted, path: " + continueFile.path,
interval,
retries
- ).catch(e => {
+ ).catch(_e => {
logTestInfo(
"Continue file was not removed after checking " +
retries +
diff --git a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
index e88a4418cb..4b12edf6f0 100644
--- a/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
+++ b/toolkit/mozapps/update/tests/data/xpcshellUtilsAUS.js
@@ -3766,7 +3766,7 @@ function checkFilesAfterUpdateSuccess(
"xattr value changed"
);
},
- reason => {
+ _reason => {
Assert.fail(MAC_APP_XATTR_KEY + " xattr is missing!");
}
);
@@ -4233,9 +4233,9 @@ async function waitForUpdateDownload(aUpdates, aExpectedStatus) {
}
return new Promise(resolve =>
gAUS.addDownloadListener({
- onStartRequest: aRequest => {},
- onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {},
- onStatus: (aRequest, aStatus, aStatusText) => {},
+ onStartRequest: _aRequest => {},
+ onProgress: (_aRequest, _aContext, _aProgress, _aMaxProgress) => {},
+ onStatus: (_aRequest, _aStatus, _aStatusText) => {},
onStopRequest(request, status) {
gAUS.removeDownloadListener(this);
Assert.equal(
@@ -4552,7 +4552,7 @@ function adjustGeneralPaths() {
* The timer callback to kill the process if it takes too long.
*/
const gAppTimerCallback = {
- notify: function TC_notify(aTimer) {
+ notify: function TC_notify(_aTimer) {
gAppTimer = null;
if (gProcess.isRunning) {
logTestInfo("attempting to kill process");
@@ -4662,7 +4662,7 @@ function IncrementalDownload() {
IncrementalDownload.prototype = {
/* nsIIncrementalDownload */
- init(uri, file, chunkSize, intervalInSeconds) {
+ init(uri, file, _chunkSize, _intervalInSeconds) {
this._destination = file;
this._URI = uri;
this._finalURI = uri;
@@ -4729,7 +4729,7 @@ IncrementalDownload.prototype = {
},
/* nsIRequest */
- cancel(aStatus) {
+ cancel(_aStatus) {
throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
},
suspend() {
diff --git a/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py b/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
index a8495064ef..9452a4fcd7 100644
--- a/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
+++ b/toolkit/mozapps/update/tests/marionette/test_no_window_update_restart.py
@@ -162,7 +162,9 @@ class TestNoWindowUpdateRestart(MarionetteTestCase):
let UM = Cc["@mozilla.org/updates/update-manager;1"].getService(Ci.nsIUpdateManager);
UM.QueryInterface(Ci.nsIObserver).observe(null, "um-reload-update-data", "skip-files");
- let { UpdateListener } = ChromeUtils.import("resource://gre/modules/UpdateListener.jsm");
+ let { UpdateListener } = ChromeUtils.importESModule(
+ "resource://gre/modules/UpdateListener.sys.mjs"
+ );
UpdateListener.reset();
let { AppMenuNotifications } = ChromeUtils.importESModule(
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js b/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js
index 0ae35ef77a..9e23fab5e0 100644
--- a/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/languagePackUpdates.js
@@ -243,9 +243,9 @@ add_task(async function testRedownload() {
let downloadCount = 0;
let listener = {
- onStartRequest: aRequest => {},
- onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {},
- onStatus: (aRequest, aStatus, aStatusText) => {},
+ onStartRequest: _aRequest => {},
+ onProgress: (_aRequest, _aContext, _aProgress, _aMaxProgress) => {},
+ onStatus: (_aRequest, _aStatus, _aStatusText) => {},
onStopRequest: (request, status) => {
Assert.equal(
status,
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js b/toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js
index 3767a44feb..411b303331 100644
--- a/toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/multiUpdate.js
@@ -73,14 +73,14 @@ async function downloadUpdate(appUpdateAuto, onDownloadStartCallback) {
}
let waitToStartPromise = new Promise(resolve => {
let listener = {
- onStartRequest: aRequest => {
+ onStartRequest: _aRequest => {
gAUS.removeDownloadListener(listener);
onDownloadStartCallback();
resolve();
},
- onProgress: (aRequest, aContext, aProgress, aMaxProgress) => {},
- onStatus: (aRequest, aStatus, aStatusText) => {},
- onStopRequest(request, status) {},
+ onProgress: (_aRequest, _aContext, _aProgress, _aMaxProgress) => {},
+ onStatus: (_aRequest, _aStatus, _aStatusText) => {},
+ onStopRequest(_request, _status) {},
QueryInterface: ChromeUtils.generateQI([
"nsIRequestObserver",
"nsIProgressEventSink",
@@ -149,7 +149,7 @@ async function testUpdateDoesNotDownload() {
);
let updateAvailableObserved = false;
- let observer = (subject, topic, status) => {
+ let observer = (_subject, _topic, _status) => {
updateAvailableObserved = true;
};
Services.obs.addObserver(observer, "update-available");
diff --git a/toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js b/toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js
index 9123f9e1e3..c705d536a4 100644
--- a/toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js
+++ b/toolkit/mozapps/update/tests/unit_aus_update/updateSyncManager.js
@@ -79,7 +79,7 @@ add_task(async function () {
await TestUtils.waitForCondition(
() => syncManager.isOtherInstanceRunning(),
"waiting for child process to take the lock"
- ).catch(e => {
+ ).catch(_e => {
// Rather than throwing out of waitForCondition(), catch and log the failure
// manually so that we get output that's a bit more readable.
Assert.ok(
@@ -93,7 +93,7 @@ add_task(async function () {
await TestUtils.waitForCondition(
() => !syncManager.isOtherInstanceRunning(),
"waiting for child process to release the lock"
- ).catch(e => {
+ ).catch(_e => {
Assert.ok(
!syncManager.isOtherInstanceRunning(),
"child process has released the lock"
diff --git a/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js b/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js
index 0d9c06b2d0..0ca74e4764 100644
--- a/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js
+++ b/toolkit/mozapps/update/tests/unit_background_update/test_backgroundupdate_glean.js
@@ -140,7 +140,7 @@ async function do_readTargeting(content, beforeNextSubmitCallback) {
// Missing targeting is anticipated.
add_task(async function test_targeting_missing() {
- await do_readTargeting(null, reason => {
+ await do_readTargeting(null, _reason => {
Assert.equal(false, Glean.backgroundUpdate.targetingExists.testGetValue());
Assert.equal(
@@ -152,7 +152,7 @@ add_task(async function test_targeting_missing() {
// Malformed JSON yields an exception.
add_task(async function test_targeting_exception() {
- await do_readTargeting("{", reason => {
+ await do_readTargeting("{", _reason => {
Assert.equal(false, Glean.backgroundUpdate.targetingExists.testGetValue());
Assert.equal(
@@ -193,7 +193,7 @@ add_task(async function test_targeting_exists() {
targets: [manager.createTargetingContext(), target],
});
- await do_readTargeting(JSON.stringify(targetSnapshot), reason => {
+ await do_readTargeting(JSON.stringify(targetSnapshot), _reason => {
Assert.equal(true, Glean.backgroundUpdate.targetingExists.testGetValue());
Assert.equal(