mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 539717 - update is paused, can't unpause. r=dtownsend
This commit is contained in:
parent
cad71d8a32
commit
3078ab39d0
@ -1177,16 +1177,11 @@ UpdateService.prototype = {
|
||||
}
|
||||
|
||||
var status = readStatusFile(getUpdatesDir());
|
||||
/**
|
||||
* STATE_NONE status means the update.status file is not present, because
|
||||
* either:
|
||||
* 1) no update was performed, and so there's no UI to show
|
||||
* 2) an update was attempted but failed during checking, transfer or
|
||||
* verification, and was cleaned up at that point, and UI notifying of
|
||||
* that error was shown at that stage.
|
||||
*/
|
||||
// STATE_NONE status means that the update.status file is present but a
|
||||
// background download error occured.
|
||||
if (status == STATE_NONE) {
|
||||
LOG("UpdateService:_postUpdateProcessing - no status, no update");
|
||||
cleanupActiveUpdate();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
/* General Update Directory Cleanup Tests - Bug 539717 */
|
||||
|
||||
function run_test() {
|
||||
removeUpdateDirsAndFiles();
|
||||
setUpdateChannel();
|
||||
|
||||
writeUpdatesToXMLFile(getLocalUpdatesXMLString(""), false);
|
||||
var patches = getLocalPatchString(null, null, null, null, null, null,
|
||||
STATE_DOWNLOADING);
|
||||
var updates = getLocalUpdateString(patches);
|
||||
writeUpdatesToXMLFile(getLocalUpdatesXMLString(updates), true);
|
||||
writeStatusFile(STATE_NONE);
|
||||
|
||||
standardInit();
|
||||
|
||||
var dir = getUpdatesDir();
|
||||
dump("Testing: " + dir.path + " exists\n");
|
||||
dir.append("0");
|
||||
do_check_true(dir.exists());
|
||||
|
||||
var statusFile = dir.clone();
|
||||
statusFile.append(FILE_UPDATE_STATUS);
|
||||
dump("Testing: " + statusFile.path + " does not exist\n");
|
||||
do_check_false(statusFile.exists());
|
||||
|
||||
do_check_eq(gUpdateManager.activeUpdate, null);
|
||||
do_check_eq(gUpdateManager.updateCount, 0);
|
||||
|
||||
cleanUp();
|
||||
}
|
Loading…
Reference in New Issue
Block a user