michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: */ michael@0: michael@0: /* Test product/channel MAR security check */ michael@0: michael@0: function run_test() { michael@0: if (!IS_MAR_CHECKS_ENABLED) { michael@0: return; michael@0: } michael@0: michael@0: setupTestCommon(); michael@0: // We don't actually care if the MAR has any data, we only care about the michael@0: // application return code and update.status result. michael@0: gTestFiles = gTestFilesCommon; michael@0: gTestDirs = []; michael@0: setupUpdaterTest(FILE_WRONG_CHANNEL_MAR, false, false); michael@0: michael@0: // Apply the MAR michael@0: // Note that if execv is used, the updater process will turn into the michael@0: // callback process, so its return code will be that of the callback michael@0: // app. michael@0: runUpdate((USE_EXECV ? 0 : 1), STATE_FAILED_CHANNEL_MISMATCH_ERROR); michael@0: } michael@0: michael@0: function checkUpdateApplied() { michael@0: checkFilesAfterUpdateSuccess(); michael@0: doTestFinish(); michael@0: }