blob: a845cb70c52de2ed87705d16b841609388041daa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
/**
* Test applying an update by staging an update and launching an application to
* apply it.
*/
async function run_test() {
if (!setupTestCommon()) {
return;
}
const STATE_AFTER_STAGE = STATE_PENDING;
gTestFiles = gTestFilesCompleteSuccess;
gTestDirs = gTestDirsCompleteSuccess;
setTestFilesAndDirsForFailure();
createUpdateInProgressLockFile(getGREBinDir());
await setupUpdaterTest(FILE_COMPLETE_MAR, false);
await stageUpdate(STATE_AFTER_STAGE, false);
removeUpdateInProgressLockFile(getGREBinDir());
checkPostUpdateRunningFile(false);
checkFilesAfterUpdateFailure(getApplyDirFile);
checkUpdateLogContains(PERFORMING_STAGED_UPDATE);
checkUpdateLogContains(ERR_UPDATE_IN_PROGRESS);
await waitForUpdateXMLFiles(true, false);
checkUpdateManager(STATE_AFTER_STAGE, true, STATE_AFTER_STAGE, 0, 0);
waitForFilesInUse();
}
|