gecko/toolkit/mozapps/update/tests/unit_base_updater/marWrongChannel.js
Robert Strong 6bc5c325e9 Test cleanup and tests for Bug 759469 - Add new updater instruction to add a file if it doesn't exist in the destination. r=bbondy
--HG--
rename : toolkit/mozapps/update/tests/unit_base_updater/marDirLockedStageFailure_win.js => toolkit/mozapps/update/tests/unit_base_updater/marAppApplyDirLockedStageFailure_win.js
rename : toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageSuccessComplete_win.js => toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailureComplete_win.js
rename : toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageSuccessPartial_win.js => toolkit/mozapps/update/tests/unit_base_updater/marFileInUseStageFailurePartial_win.js
rename : toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageSuccessComplete_win.js => toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailureComplete_win.js
rename : toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageSuccessPartial_win.js => toolkit/mozapps/update/tests/unit_base_updater/marRMRFDirFileInUseStageFailurePartial_win.js
rename : toolkit/mozapps/update/tests/unit_service_updater/marDirLockedStageFailureSvc_win.js => toolkit/mozapps/update/tests/unit_service_updater/marAppApplyDirLockedStageFailureSvc_win.js
rename : toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageSuccessCompleteSvc_win.js => toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailureCompleteSvc_win.js
rename : toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageSuccessPartialSvc_win.js => toolkit/mozapps/update/tests/unit_service_updater/marFileInUseStageFailurePartialSvc_win.js
rename : toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageSuccessCompleteSvc_win.js => toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailureCompleteSvc_win.js
rename : toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageSuccessPartialSvc_win.js => toolkit/mozapps/update/tests/unit_service_updater/marRMRFDirFileInUseStageFailurePartialSvc_win.js
2014-03-05 11:43:28 -08:00

31 lines
919 B
JavaScript

/* 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/.
*/
/* Test product/channel MAR security check */
function run_test() {
if (!IS_MAR_CHECKS_ENABLED) {
return;
}
setupTestCommon();
// We don't actually care if the MAR has any data, we only care about the
// application return code and update.status result.
gTestFiles = gTestFilesCommon;
gTestDirs = [];
setupUpdaterTest(FILE_WRONG_CHANNEL_MAR, false, false);
// Apply the MAR
// Note that if execv is used, the updater process will turn into the
// callback process, so its return code will be that of the callback
// app.
runUpdate((USE_EXECV ? 0 : 1), STATE_FAILED_CHANNEL_MISMATCH_ERROR);
}
function checkUpdateApplied() {
checkFilesAfterUpdateSuccess();
doTestFinish();
}