Bug 1159118 - Minor code cleanup. r=spohl

This commit is contained in:
Robert Strong 2015-04-28 08:28:23 -07:00
parent 4073b139db
commit b17bce13e6
3 changed files with 7 additions and 6 deletions

View File

@ -45,7 +45,7 @@ this.AUSTLMY = {
CHK_SHOWPROMPT_PREF: 3,
// Incompatible add-on check disabled by preference (background download)
CHK_ADDON_PREF_DISABLED: 4,
// Incompatible add-on checke not performed due to same app version as the
// Incompatible add-on check not performed due to same app version as the
// update's app version (background download)
CHK_ADDON_SAME_APP_VER: 5,
// Incompatible add-ons found and all of them have updates (background download)

View File

@ -648,12 +648,11 @@ function getCanStageUpdates() {
return false;
}
if (AppConstants.platform == "win" && isServiceInstalled() &&
shouldUseService()) {
// No need to perform directory write checks, the maintenance service will
// be able to write to all directories.
LOG("getCanStageUpdates - able to stage updates because we'll use the service");
LOG("getCanStageUpdates - able to stage updates using the service");
return true;
}
@ -661,7 +660,7 @@ function getCanStageUpdates() {
// files into place.
if (AppConstants.platform == "gonk") {
LOG("getCanStageUpdates - able to stage updates because this is gonk");
return true;
return true;
}
if (!hasUpdateMutex()) {

View File

@ -376,7 +376,8 @@ function run_test_pt11() {
function check_test_pt11() {
let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
Assert.ok(!bestUpdate);
Assert.ok(!bestUpdate,
"there should be no update available");
run_test_pt12();
}
@ -392,7 +393,8 @@ function run_test_pt12() {
function check_test_pt12() {
let bestUpdate = gAUS.selectUpdate(gUpdates, gUpdateCount);
Assert.ok(!!bestUpdate);
Assert.ok(!!bestUpdate,
"there should be one update available");
Assert.equal(bestUpdate.displayVersion, "version 1.0",
"the update displayVersion attribute" + MSG_SHOULD_EQUAL);