icecat: add release icecat-140.6.0-1gnu1 for aramo
This commit is contained in:
parent
92fef42cd6
commit
17ba0259bf
3382 changed files with 457689 additions and 569094 deletions
|
|
@ -0,0 +1,31 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Patch app binary Zucchini partial MAR file staged patch apply success
|
||||
test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
const STATE_AFTER_STAGE = gIsServiceTest ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
gCallbackBinFile = "exe0.exe";
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
await stageUpdate(STATE_AFTER_STAGE, true);
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateSuccess(getStageDirFile, true);
|
||||
checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
|
||||
// Switch the application to the staged application that was updated.
|
||||
runUpdate(STATE_SUCCEEDED, true, 0, true);
|
||||
await checkPostUpdateAppLog();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(true);
|
||||
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
|
||||
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* Patch app binary Zucchini partial MAR file patch apply success test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
gCallbackBinFile = "exe0.exe";
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||
await checkPostUpdateAppLog();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(true);
|
||||
checkFilesAfterUpdateSuccess(getApplyDirFile);
|
||||
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/* 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/.
|
||||
*/
|
||||
|
||||
/* General Zucchini Partial MAR File Patch Apply Failure Test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
getTestFileByName("0exe0.exe").originalFile = "partial.png";
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
setTestFilesAndDirsForFailure();
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
// If execv is used the updater process will turn into the callback process
|
||||
// and the updater's return code will be that of the callback process.
|
||||
runUpdate(
|
||||
STATE_FAILED_LOADSOURCE_ERROR_WRONG_SIZE,
|
||||
false,
|
||||
USE_EXECV ? 0 : 1,
|
||||
true
|
||||
);
|
||||
checkAppBundleModTime();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateFailure(getApplyDirFile);
|
||||
checkUpdateLogContents(LOG_PARTIAL_FAILURE);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(
|
||||
STATE_NONE,
|
||||
false,
|
||||
STATE_FAILED,
|
||||
LOADSOURCE_ERROR_WRONG_SIZE,
|
||||
1
|
||||
);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* File in use Zucchini partial MAR file staged patch apply failure test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
const STATE_AFTER_STAGE = gIsServiceTest ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||
const STATE_AFTER_RUNUPDATE = gIsServiceTest
|
||||
? STATE_PENDING_SVC
|
||||
: STATE_PENDING;
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
const testFile = getTestFileByName("0exe0.exe");
|
||||
await runHelperFileInUse(testFile.relPathDir + testFile.fileName, false);
|
||||
await stageUpdate(STATE_AFTER_STAGE, true);
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateSuccess(getStageDirFile, true);
|
||||
checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
|
||||
// Switch the application to the staged application that was updated.
|
||||
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
|
||||
await waitForHelperExit();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(false);
|
||||
setTestFilesAndDirsForFailure();
|
||||
checkFilesAfterUpdateFailure(getApplyDirFile);
|
||||
checkUpdateLogContains(ERR_RENAME_FILE);
|
||||
checkUpdateLogContains(
|
||||
ERR_MOVE_DESTDIR_7 + "\n" + STATE_FAILED_WRITE_ERROR + "\n" + CALL_QUIT
|
||||
);
|
||||
await waitForUpdateXMLFiles(true, false);
|
||||
await checkUpdateManager(
|
||||
STATE_AFTER_RUNUPDATE,
|
||||
true,
|
||||
STATE_AFTER_RUNUPDATE,
|
||||
0,
|
||||
0
|
||||
);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* File in use Zucchini partial MAR file patch apply success test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
const testFile = getTestFileByName("0exe0.exe");
|
||||
await runHelperFileInUse(testFile.relPathDir + testFile.fileName, false);
|
||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||
await waitForHelperExit();
|
||||
await checkPostUpdateAppLog();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(true);
|
||||
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
|
||||
checkUpdateLogContains(ERR_BACKUP_DISCARD);
|
||||
checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* File locked Zucchini partial MAR file patch apply failure test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
setTestFilesAndDirsForFailure();
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
await runHelperLockFile(getTestFileByName("searchpluginspng1.png"));
|
||||
runUpdate(STATE_FAILED_READ_ERROR, false, 1, true);
|
||||
await waitForHelperExit();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateFailure(getApplyDirFile);
|
||||
checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);
|
||||
checkUpdateLogContains(STATE_FAILED_READ_ERROR + "\n" + CALL_QUIT);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_FAILED, READ_ERROR, 1);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* File locked Zucchini partial MAR file staged patch apply failure test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
const STATE_AFTER_STAGE = gIsServiceTest ? STATE_PENDING_SVC : STATE_PENDING;
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
setTestFilesAndDirsForFailure();
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
await runHelperLockFile(getTestFileByName("searchpluginspng1.png"));
|
||||
await stageUpdate(STATE_AFTER_STAGE, true);
|
||||
checkPostUpdateRunningFile(false);
|
||||
// Files aren't checked after staging since this test locks a file which
|
||||
// prevents reading the file.
|
||||
checkUpdateLogContains(ERR_ENSURE_COPY);
|
||||
// Switch the application to the staged application that was updated.
|
||||
runUpdate(STATE_FAILED_READ_ERROR, false, 1, false);
|
||||
await waitForHelperExit();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateFailure(getApplyDirFile);
|
||||
checkUpdateLogContains(ERR_UNABLE_OPEN_DEST);
|
||||
checkUpdateLogContains(STATE_FAILED_READ_ERROR + "\n" + CALL_QUIT);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_FAILED, READ_ERROR, 1);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* File in use inside removed dir Zucchini partial MAR file staged patch apply
|
||||
failure test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
const STATE_AFTER_STAGE = gIsServiceTest ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||
const STATE_AFTER_RUNUPDATE = gIsServiceTest
|
||||
? STATE_PENDING_SVC
|
||||
: STATE_PENDING;
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
await runHelperFileInUse(
|
||||
gTestDirs[2].relPathDir + gTestDirs[2].files[0],
|
||||
true
|
||||
);
|
||||
await stageUpdate(STATE_AFTER_STAGE, true);
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateSuccess(getStageDirFile, true);
|
||||
checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true);
|
||||
// Switch the application to the staged application that was updated.
|
||||
runUpdate(STATE_AFTER_RUNUPDATE, true, 1, true);
|
||||
await waitForHelperExit();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(false);
|
||||
setTestFilesAndDirsForFailure();
|
||||
checkFilesAfterUpdateFailure(getApplyDirFile);
|
||||
checkUpdateLogContains(ERR_RENAME_FILE);
|
||||
checkUpdateLogContains(
|
||||
ERR_MOVE_DESTDIR_7 + "\n" + STATE_FAILED_WRITE_ERROR + "\n" + CALL_QUIT
|
||||
);
|
||||
await waitForUpdateXMLFiles(true, false);
|
||||
await checkUpdateManager(
|
||||
STATE_AFTER_RUNUPDATE,
|
||||
true,
|
||||
STATE_AFTER_RUNUPDATE,
|
||||
0,
|
||||
0
|
||||
);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* File in use inside removed dir Zucchini partial MAR file patch apply success
|
||||
test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
await runHelperFileInUse(
|
||||
gTestDirs[2].relPathDir + gTestDirs[2].files[0],
|
||||
true
|
||||
);
|
||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||
await waitForHelperExit();
|
||||
await checkPostUpdateAppLog();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(true);
|
||||
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
|
||||
checkUpdateLogContains(ERR_BACKUP_DISCARD);
|
||||
checkUpdateLogContains(STATE_SUCCEEDED + "\n" + CALL_QUIT);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/* 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/.
|
||||
*/
|
||||
|
||||
/* General Zucchini Partial MAR File Staged Patch Apply Failure Test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
const STATE_AFTER_STAGE = STATE_FAILED;
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
getTestFileByName("0exe0.exe").originalFile = "partial.png";
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
setTestFilesAndDirsForFailure();
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false);
|
||||
await stageUpdate(STATE_AFTER_STAGE, true, true);
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateFailure(getApplyDirFile);
|
||||
checkUpdateLogContains(ERR_LOADSOURCEFILE_FAILED);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(
|
||||
STATE_NONE,
|
||||
false,
|
||||
STATE_FAILED,
|
||||
LOADSOURCE_ERROR_WRONG_SIZE,
|
||||
1
|
||||
);
|
||||
await waitForFilesInUse();
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
/* 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/.
|
||||
*/
|
||||
|
||||
/* General Zucchini Partial MAR File Staged Patch Apply Test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
const STATE_AFTER_STAGE = gIsServiceTest ? STATE_APPLIED_SVC : STATE_APPLIED;
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
const channelPrefs = getTestFileByName(FILE_CHANNEL_PREFS);
|
||||
channelPrefs.originalContents = null;
|
||||
channelPrefs.compareContents = "FromPartial\n";
|
||||
channelPrefs.comparePerms = 0o644;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
preventDistributionFiles();
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, true);
|
||||
await stageUpdate(STATE_AFTER_STAGE, true);
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateSuccess(getStageDirFile, true);
|
||||
checkUpdateLogContents(LOG_PARTIAL_SUCCESS, true, false, true);
|
||||
// Switch the application to the staged application that was updated.
|
||||
runUpdate(STATE_SUCCEEDED, true, 0, true);
|
||||
await checkPostUpdateAppLog();
|
||||
checkAppBundleModTime();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(true);
|
||||
checkFilesAfterUpdateSuccess(getApplyDirFile, false, true);
|
||||
checkUpdateLogContents(LOG_REPLACE_SUCCESS, false, true, true);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/* 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/.
|
||||
*/
|
||||
|
||||
/* General Zucchini Partial MAR File Patch Apply Test */
|
||||
|
||||
async function run_test() {
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
const channelPrefs = getTestFileByName(FILE_CHANNEL_PREFS);
|
||||
channelPrefs.originalContents = null;
|
||||
channelPrefs.compareContents = "FromPartial\n";
|
||||
channelPrefs.comparePerms = 0o644;
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
// The third parameter will test that a relative path that contains a
|
||||
// directory traversal to the post update binary doesn't execute.
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false, "test/../");
|
||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||
checkAppBundleModTime();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateSuccess(getApplyDirFile);
|
||||
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
/* 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/.
|
||||
*/
|
||||
|
||||
/* General Zucchini Partial MAR File Patch Apply Test */
|
||||
|
||||
const { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
const { BackgroundTasksTestUtils } = ChromeUtils.importESModule(
|
||||
"resource://testing-common/BackgroundTasksTestUtils.sys.mjs"
|
||||
);
|
||||
BackgroundTasksTestUtils.init(this);
|
||||
const do_backgroundtask = BackgroundTasksTestUtils.do_backgroundtask.bind(
|
||||
BackgroundTasksTestUtils
|
||||
);
|
||||
|
||||
async function run_test() {
|
||||
// Without omnijars, the background task apparatus will fail to find task
|
||||
// definitions.
|
||||
{
|
||||
let omniJa = Services.dirsvc.get("XCurProcD", Ci.nsIFile);
|
||||
omniJa.append("omni.ja");
|
||||
if (!omniJa.exists()) {
|
||||
Assert.ok(
|
||||
false,
|
||||
"This test requires a packaged build, " +
|
||||
"run 'mach package' and then use 'mach xpcshell-test --xre-path=...'"
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!setupTestCommon()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// `channel-prefs.js` (or `ChannelPrefs.framework/ChannelPrefs on macOS`) is
|
||||
// required for IceCat to launch, including in background task mode. The
|
||||
// testing partial MAR updates `channel-prefs.js` to have contents
|
||||
// `FromPartial`, which is not a valid prefs file and causes IceCat to crash.
|
||||
// However, `channel-prefs.js` is listed as `add-if-not
|
||||
// "defaults/pref/channel-prefs.js" "defaults/pref/channel-prefs.js"`, so it
|
||||
// won't be updated if it already exists. The manipulations below arrange a)
|
||||
// for the file to exist and b) for the comparison afterward to succeed.
|
||||
gTestFiles = gTestFilesPartialSuccess;
|
||||
let channelPrefs = getTestFileByName(FILE_CHANNEL_PREFS);
|
||||
let f = gGREDirOrig.clone();
|
||||
if (AppConstants.platform == "macosx") {
|
||||
f = f.parent;
|
||||
f.append("Frameworks");
|
||||
f.append("ChannelPrefs.framework");
|
||||
f.append("ChannelPrefs");
|
||||
} else {
|
||||
f.append("defaults");
|
||||
f.append("pref");
|
||||
f.append("channel-prefs.js");
|
||||
}
|
||||
|
||||
// `originalFile` is a relative path, so we can't just point to the one in the
|
||||
// original GRE directory.
|
||||
channelPrefs.originalFile = null;
|
||||
channelPrefs.originalContents = readFile(f);
|
||||
channelPrefs.compareContents = channelPrefs.originalContents;
|
||||
|
||||
gTestDirs = gTestDirsPartialSuccess;
|
||||
// The third parameter will test that a relative path that contains a
|
||||
// directory traversal to the post update binary doesn't execute.
|
||||
await setupUpdaterTest(FILE_PARTIAL_ZUCCHINI_MAR, false, "test/../", true, {
|
||||
// We need packaged JavaScript to run background tasks.
|
||||
requiresOmnijar: true,
|
||||
});
|
||||
|
||||
// `0/00/00text2` is just a random file in the testing partial MAR that does
|
||||
// not exist before the update and is always written by the update.
|
||||
let exitCode;
|
||||
exitCode = await do_backgroundtask("file_exists", {
|
||||
extraArgs: [getApplyDirFile(DIR_RESOURCES + "0/00/00text2").path],
|
||||
});
|
||||
// Before updating, file doesn't exist.
|
||||
Assert.equal(11, exitCode);
|
||||
|
||||
// This task will wait 10 seconds before exiting, which should overlap with
|
||||
// the update below. We wait for some output from the wait background task,
|
||||
// so that there is meaningful overlap.
|
||||
let taskStarted = Promise.withResolvers();
|
||||
let p = do_backgroundtask("wait", {
|
||||
onStdoutLine: (line, proc) => {
|
||||
// This sentinel seems pretty safe: it's printed by the task itself and so
|
||||
// there should be a straight line between future test failures and
|
||||
// logging changes.
|
||||
if (line.includes("runBackgroundTask: wait")) {
|
||||
taskStarted.resolve(proc);
|
||||
}
|
||||
},
|
||||
});
|
||||
let proc = await taskStarted.promise;
|
||||
|
||||
runUpdate(STATE_SUCCEEDED, false, 0, true);
|
||||
|
||||
checkAppBundleModTime();
|
||||
await testPostUpdateProcessing();
|
||||
checkPostUpdateRunningFile(false);
|
||||
checkFilesAfterUpdateSuccess(getApplyDirFile);
|
||||
checkUpdateLogContents(LOG_PARTIAL_SUCCESS);
|
||||
await waitForUpdateXMLFiles();
|
||||
await checkUpdateManager(STATE_NONE, false, STATE_SUCCEEDED, 0, 1);
|
||||
|
||||
// Once we've seen what we want, there's no need to let the task wait complete.
|
||||
await proc.kill();
|
||||
|
||||
Assert.ok("Waiting for background task to die after kill()");
|
||||
exitCode = await p;
|
||||
|
||||
// Windows does not support killing processes gracefully, so they will
|
||||
// always exit with -9 there.
|
||||
let retVal = AppConstants.platform == "win" ? -9 : -15;
|
||||
Assert.equal(retVal, exitCode);
|
||||
|
||||
exitCode = await do_backgroundtask("file_exists", {
|
||||
extraArgs: [getApplyDirFile(DIR_RESOURCES + "0/00/00text2").path],
|
||||
});
|
||||
// After updating, file exists.
|
||||
Assert.equal(0, exitCode);
|
||||
|
||||
// This finishes the test, so must be last.
|
||||
checkCallbackLog();
|
||||
}
|
||||
|
|
@ -76,6 +76,10 @@ skip-if = [
|
|||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marCallbackAppStageSuccessPartialZucchini_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marCallbackAppStageSuccessPartial_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
|
@ -84,6 +88,10 @@ reason = "Windows only test"
|
|||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marCallbackAppSuccessPartialZucchini_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marCallbackAppSuccessPartial_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
|
@ -94,10 +102,16 @@ reason = "Unix only test"
|
|||
|
||||
["marFailurePartial.js"]
|
||||
|
||||
["marFailurePartialZucchini.js"]
|
||||
|
||||
["marFileInUseStageFailureComplete_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marFileInUseStageFailurePartialZucchini_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marFileInUseStageFailurePartial_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
|
@ -106,6 +120,10 @@ reason = "Windows only test"
|
|||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marFileInUseSuccessPartialZucchini_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marFileInUseSuccessPartial_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
|
@ -114,6 +132,10 @@ reason = "Windows only test"
|
|||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marFileLockedFailurePartialZucchini_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marFileLockedFailurePartial_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
|
@ -122,6 +144,10 @@ reason = "Windows only test"
|
|||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marFileLockedStageFailurePartialZucchini_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marFileLockedStageFailurePartial_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
|
@ -145,6 +171,10 @@ reason = "Post-update only supported on Windows and macOS"
|
|||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marRMRFDirFileInUseStageFailurePartialZucchini_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marRMRFDirFileInUseStageFailurePartial_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
|
@ -153,12 +183,18 @@ reason = "Windows only test"
|
|||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marRMRFDirFileInUseSuccessPartialZucchini_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marRMRFDirFileInUseSuccessPartial_win.js"]
|
||||
run-if = ["os == 'win'"]
|
||||
reason = "Windows only test"
|
||||
|
||||
["marStageFailurePartial.js"]
|
||||
|
||||
["marStageFailurePartialZucchini.js"]
|
||||
|
||||
["marStageSuccessComplete.js"]
|
||||
skip-if = [
|
||||
"os == 'mac' && os_version == '11.20' && arch == 'aarch64'", # Bug 1871787
|
||||
|
|
@ -169,12 +205,18 @@ skip-if = [
|
|||
"os == 'mac' && os_version == '11.20' && arch == 'aarch64'", # Bug 1942377
|
||||
]
|
||||
|
||||
["marStageSuccessPartialZucchini.js"]
|
||||
|
||||
["marSuccessComplete.js"]
|
||||
|
||||
["marSuccessPartial.js"]
|
||||
|
||||
["marSuccessPartialWhileBackgroundTaskRunning.js"]
|
||||
|
||||
["marSuccessPartialZucchini.js"]
|
||||
|
||||
["marSuccessPartialZucchiniWhileBackgroundTaskRunning.js"]
|
||||
|
||||
["marVersionDowngrade.js"]
|
||||
|
||||
["marWrongChannel.js"]
|
||||
|
|
|
|||
|
|
@ -71,65 +71,101 @@ run-sequentially = "Uses the GNU Maintenance Service."
|
|||
["marCallbackAppStageSuccessComplete_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marCallbackAppStageSuccessPartialZucchini_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marCallbackAppStageSuccessPartial_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marCallbackAppSuccessComplete_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marCallbackAppSuccessPartialZucchini_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marCallbackAppSuccessPartial_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFailurePartial.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFailurePartialZucchini.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileInUseStageFailureComplete_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileInUseStageFailurePartialZucchini_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileInUseStageFailurePartial_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileInUseSuccessComplete_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileInUseSuccessPartialZucchini_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileInUseSuccessPartial_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileLockedFailureComplete_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileLockedFailurePartialZucchini_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileLockedFailurePartial_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileLockedStageFailureComplete_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileLockedStageFailurePartialZucchini_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marFileLockedStageFailurePartial_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marRMRFDirFileInUseStageFailureComplete_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marRMRFDirFileInUseStageFailurePartialZucchini_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marRMRFDirFileInUseStageFailurePartial_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marRMRFDirFileInUseSuccessComplete_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marRMRFDirFileInUseSuccessPartialZucchini_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marRMRFDirFileInUseSuccessPartial_win.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marStageFailurePartial.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marStageFailurePartialZucchini.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marStageSuccessComplete.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marStageSuccessPartial.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marStageSuccessPartialZucchini.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marSuccessComplete.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marSuccessPartial.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
||||
["marSuccessPartialZucchini.js"]
|
||||
run-sequentially = "Uses the GNU Maintenance Service."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue