Bug 1875502 - Pre: Make initUpdateServiceStub async r=nalexander,application-update-reviewers

This is because initializing the update service will be an asynchronous process. This is introduced later in this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D209121
This commit is contained in:
Robin Steuber 2024-05-16 20:01:51 +00:00
parent 9c1a207525
commit 40d2bcc4f9
97 changed files with 107 additions and 107 deletions

View file

@ -181,7 +181,7 @@ async function testPostUpdateProcessing() {
}
/* Initializes the update service stub */
function initUpdateServiceStub() {
async function initUpdateServiceStub() {
Cc["@mozilla.org/updates/update-service-stub;1"].createInstance(
Ci.nsISupports
);

View file

@ -1445,9 +1445,9 @@ function checkPostUpdateRunningFile(aShouldExist) {
* Initializes the most commonly used settings and creates an instance of the
* update service stub.
*/
function standardInit() {
async function standardInit() {
// Initialize the update service stub component
initUpdateServiceStub();
await initUpdateServiceStub();
}
/**

View file

@ -20,7 +20,7 @@ async function run_test() {
setUpdateChannel("original_channel");
standardInit();
await standardInit();
Assert.ok(
!(await gUpdateManager.getDownloadingUpdate()),

View file

@ -18,7 +18,7 @@ async function run_test() {
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_DOWNLOADING);
standardInit();
await standardInit();
Assert.ok(
!(await gUpdateManager.getDownloadingUpdate()),

View file

@ -19,7 +19,7 @@ async function run_test() {
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_DOWNLOADING);
standardInit();
await standardInit();
Assert.ok(
!(await gUpdateManager.getDownloadingUpdate()),

View file

@ -17,7 +17,7 @@ async function run_test() {
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_NONE);
standardInit();
await standardInit();
Assert.ok(
!(await gUpdateManager.getDownloadingUpdate()),

View file

@ -21,7 +21,7 @@ async function run_test() {
log = getUpdateDirFile(FILE_UPDATE_ELEVATED_LOG);
writeFile(log, "Last Update Elevated Log");
standardInit();
await standardInit();
Assert.ok(
!(await gUpdateManager.getDownloadingUpdate()),

View file

@ -99,7 +99,7 @@ async function testCleanupSuccessLogsFIFO(
"Last Update Elevated Log"
);
standardInit();
await standardInit();
Assert.ok(
!(await gUpdateManager.getDownloadingUpdate()),

View file

@ -18,7 +18,7 @@ async function run_test() {
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
writeStatusFile(STATE_DOWNLOADING);
standardInit();
await standardInit();
const history = await gUpdateManager.getHistory();
Assert.equal(

View file

@ -55,7 +55,7 @@ async function testTransition(options) {
async function run_test() {
setupTestCommon(null);
standardInit();
await standardInit();
// The setup functions we use for update testing typically allow for update.
// But we are just testing preferences here. We don't want anything to
// actually attempt to update. Also, because we are messing with the pref

View file

@ -161,7 +161,7 @@ async function changeAndVerifyPref(
async function run_test() {
setupTestCommon(null);
standardInit();
await standardInit();
await testSetup();
logTestInfo("Testing boolean pref and its observer");

View file

@ -15,7 +15,7 @@ async function verifyPref(expectedValue) {
async function run_test() {
setupTestCommon(null);
standardInit();
await standardInit();
let configFile = getUpdateDirFile(FILE_UPDATE_CONFIG_JSON);

View file

@ -153,7 +153,7 @@ async function run_test() {
const pendingPingContents = "arbitrary pending ping file contents";
writeFile(oldPendingPingFile, pendingPingContents);
standardInit();
await standardInit();
Assert.ok(
!(await gUpdateManager.getDownloadingUpdate()),

View file

@ -74,7 +74,7 @@ async function run_test() {
updates = getLocalUpdateString(updateProps, patches);
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), false);
standardInit();
await standardInit();
Assert.ok(
!(await gUpdateManager.getDownloadingUpdate()),

View file

@ -10,12 +10,12 @@ const { BackgroundUpdate } = ChromeUtils.importESModule(
"resource://gre/modules/BackgroundUpdate.sys.mjs"
);
// These tests use per-installation prefs, and those are a shared resource, so
// they require some non-trivial setup.
setupTestCommon(null);
standardInit();
add_setup(async function test_setup() {
// These tests use per-installation prefs, and those are a shared resource, so
// they require some non-trivial setup.
setupTestCommon(null);
await standardInit();
add_setup(function test_setup() {
// FOG needs a profile directory to put its data in.
do_get_profile();

View file

@ -24,11 +24,6 @@ const { sinon } = ChromeUtils.importESModule(
// We can't reasonably check NO_MOZ_BACKGROUNDTASKS, nor NO_OMNIJAR.
// These tests use per-installation prefs, and those are a shared resource, so
// they require some non-trivial setup.
setupTestCommon(null);
standardInit();
function setup_enterprise_policy_testing() {
// This initializes the policy engine for xpcshell tests
let policies = Cc["@mozilla.org/enterprisepolicies;1"].getService(
@ -49,7 +44,12 @@ async function setupPolicyEngineWithJson(json, customSchema) {
return EnterprisePolicyTesting.setupPolicyEngineWithJson(json, customSchema);
}
add_setup(function test_setup() {
add_setup(async function test_setup() {
// These tests use per-installation prefs, and those are a shared resource, so
// they require some non-trivial setup.
setupTestCommon(null);
await standardInit();
// FOG needs a profile directory to put its data in.
do_get_profile();

View file

@ -17,7 +17,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
let path = getTestDirFile(FILE_HELPER_BIN).path;
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, null, path);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -24,7 +24,7 @@ async function run_test() {
path = path.repeat(1000); // 10000 characters
}
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, null, path);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -26,7 +26,7 @@ async function run_test() {
path = path.repeat(1000); // 10000 characters
}
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -23,7 +23,7 @@ async function run_test() {
path = "/" + path + "/../" + path;
}
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -18,7 +18,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
let path = getApplyDirFile("..", false).path;
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -23,7 +23,7 @@ async function run_test() {
path = path + "/../";
}
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -18,7 +18,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
let path = getApplyDirFile("..", false).path;
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true, null, null, path, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -18,7 +18,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
let path = "\\\\.\\" + getApplyDirFile(null, false).path;
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -17,7 +17,7 @@ async function run_test() {
setTestFilesAndDirsForFailure();
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, "test", null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -24,7 +24,7 @@ async function run_test() {
await runUpdateUsingApp(STATE_SUCCEEDED);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);

View file

@ -50,7 +50,7 @@ async function run_test() {
// Reload the update manager now that the update directory files are locked.
reloadUpdateManagerData();
await runUpdateUsingApp(STATE_PENDING);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await checkUpdateManager(STATE_PENDING, false, STATE_NONE, 0, 0);

View file

@ -32,7 +32,7 @@ async function run_test() {
writeVersionFile("0.9");
// Try to switch the application to the fake staged application.
await runUpdateUsingApp(STATE_AFTER_STAGE);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -23,7 +23,7 @@ async function run_test() {
await runUpdateUsingApp(STATE_SUCCEEDED);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -21,7 +21,7 @@ async function run_test() {
);
await runUpdateUsingApp(STATE_SUCCEEDED);
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);

View file

@ -29,7 +29,7 @@ async function run_test() {
);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -23,7 +23,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -30,7 +30,7 @@ async function run_test() {
await checkPostUpdateAppLog();
checkAppBundleModTime();
checkSymLinks();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -16,7 +16,7 @@ async function run_test() {
await waitForHelperExit();
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);

View file

@ -20,7 +20,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_SUCCEEDED, true, 0, true);
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -20,7 +20,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_SUCCEEDED, true, 0, true);
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -14,7 +14,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
runUpdate(STATE_SUCCEEDED, false, 0, true);
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);

View file

@ -14,7 +14,7 @@ async function run_test() {
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
runUpdate(STATE_SUCCEEDED, false, 0, true);
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);

View file

@ -28,7 +28,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS, false, false, true);

View file

@ -23,7 +23,7 @@ async function run_test() {
true
);
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContents(LOG_PARTIAL_FAILURE);

View file

@ -24,7 +24,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -24,7 +24,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -16,7 +16,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContains(ERR_BACKUP_DISCARD);

View file

@ -16,7 +16,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContains(ERR_BACKUP_DISCARD);

View file

@ -15,7 +15,7 @@ async function run_test() {
await runHelperLockFile(getTestFileByName("searchpluginspng0.png"));
runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(ERR_RENAME_FILE);

View file

@ -15,7 +15,7 @@ async function run_test() {
await runHelperLockFile(getTestFileByName("searchpluginspng1.png"));
runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);

View file

@ -22,7 +22,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, false);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(ERR_RENAME_FILE);

View file

@ -22,7 +22,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_FAILED_READ_ERROR, false, 1, false);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);

View file

@ -36,7 +36,7 @@ async function run_test() {
USE_EXECV ? 0 : 1,
false
);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(STATE_FAILED_UPDATE_SETTINGS_FILE_CHANNEL);

View file

@ -15,7 +15,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContains(ERR_PARENT_PID_PERSISTS);

View file

@ -29,7 +29,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -27,7 +27,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -20,7 +20,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContains(ERR_BACKUP_DISCARD);

View file

@ -18,7 +18,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContains(ERR_BACKUP_DISCARD);

View file

@ -27,7 +27,7 @@ async function run_test() {
await checkPostUpdateAppLog();
checkAppBundleModTime();
checkSymLinks();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -26,7 +26,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, true, 0, true);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true, true);

View file

@ -16,7 +16,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS, false, false, true);

View file

@ -20,7 +20,7 @@ async function run_test() {
await setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
runUpdate(STATE_SUCCEEDED, false, 0, true);
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);

View file

@ -91,7 +91,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);

View file

@ -25,7 +25,7 @@ async function run_test() {
USE_EXECV ? 0 : 1,
false
);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(STATE_FAILED_VERSION_DOWNGRADE_ERROR);

View file

@ -26,7 +26,7 @@ async function run_test() {
USE_EXECV ? 0 : 1,
false
);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(STATE_FAILED_MAR_CHANNEL_MISMATCH_ERROR);

View file

@ -29,7 +29,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -26,7 +26,7 @@ async function run_test() {
path = path.repeat(1000); // 10000 characters
}
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -23,7 +23,7 @@ async function run_test() {
path = "/" + path + "/../" + path;
}
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, path, null, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -18,7 +18,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
let path = getApplyDirFile("..", false).path;
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -18,7 +18,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
let path = getUpdateDirFile(DIR_PATCH).parent.path;
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -23,7 +23,7 @@ async function run_test() {
path = path + "/../";
}
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, path, null, null, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -18,7 +18,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
let path = getApplyDirFile("..", false).path;
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true, null, null, path, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -18,7 +18,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
let path = "\\\\.\\" + getApplyDirFile(null, false).path;
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, path, null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -17,7 +17,7 @@ async function run_test() {
setTestFilesAndDirsForFailure();
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
runUpdate(STATE_AFTER_RUNUPDATE, false, 1, true, null, null, "test", null);
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
await waitForUpdateXMLFiles();

View file

@ -24,7 +24,7 @@ async function run_test() {
await runUpdateUsingApp(STATE_SUCCEEDED);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);

View file

@ -23,7 +23,7 @@ async function run_test() {
await runUpdateUsingApp(STATE_SUCCEEDED);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -21,7 +21,7 @@ async function run_test() {
);
await runUpdateUsingApp(STATE_SUCCEEDED);
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);

View file

@ -29,7 +29,7 @@ async function run_test() {
);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -23,7 +23,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -16,7 +16,7 @@ async function run_test() {
await waitForHelperExit();
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);

View file

@ -20,7 +20,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_SUCCEEDED, true, 0, true);
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -20,7 +20,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_SUCCEEDED, true, 0, true);
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -14,7 +14,7 @@ async function run_test() {
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
runUpdate(STATE_SUCCEEDED, false, 0, true);
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS);

View file

@ -14,7 +14,7 @@ async function run_test() {
await setupUpdaterTest(FILE_PARTIAL_MAR, false);
runUpdate(STATE_SUCCEEDED, false, 0, true);
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);

View file

@ -23,7 +23,7 @@ async function run_test() {
true
);
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContents(LOG_PARTIAL_FAILURE);

View file

@ -24,7 +24,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -24,7 +24,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -16,7 +16,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContains(ERR_BACKUP_DISCARD);

View file

@ -16,7 +16,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContains(ERR_BACKUP_DISCARD);

View file

@ -15,7 +15,7 @@ async function run_test() {
await runHelperLockFile(getTestFileByName("searchpluginspng0.png"));
runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(ERR_RENAME_FILE);

View file

@ -15,7 +15,7 @@ async function run_test() {
await runHelperLockFile(getTestFileByName("searchpluginspng1.png"));
runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);

View file

@ -22,7 +22,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_FAILED_WRITE_ERROR, false, 1, false);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(ERR_RENAME_FILE);

View file

@ -22,7 +22,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_FAILED_READ_ERROR, false, 1, false);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);

View file

@ -29,7 +29,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -27,7 +27,7 @@ async function run_test() {
// Switch the application to the staged application that was updated.
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
await waitForHelperExit();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
setTestFilesAndDirsForFailure();
checkFilesAfterUpdateFailure(getApplyDirFile);

View file

@ -20,7 +20,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContains(ERR_BACKUP_DISCARD);

View file

@ -18,7 +18,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await waitForHelperExit();
await checkPostUpdateAppLog();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContains(ERR_BACKUP_DISCARD);

View file

@ -27,7 +27,7 @@ async function run_test() {
await checkPostUpdateAppLog();
checkAppBundleModTime();
checkSymLinks();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);

View file

@ -26,7 +26,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, true, 0, true);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true, true);

View file

@ -16,7 +16,7 @@ async function run_test() {
runUpdate(STATE_SUCCEEDED, false, 0, true);
await checkPostUpdateAppLog();
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(true);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_COMPLETE_SUCCESS, false, false, true);

View file

@ -20,7 +20,7 @@ async function run_test() {
await setupUpdaterTest(FILE_PARTIAL_MAR, false, "test/../");
runUpdate(STATE_SUCCEEDED, false, 0, true);
checkAppBundleModTime();
standardInit();
await standardInit();
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateSuccess(getApplyDirFile);
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);