Bug 572162 - Changes to tests for update root hash changes. r=rstrong

This commit is contained in:
Brian R. Bondy 2013-05-15 10:58:09 -07:00
parent 96ee2048cc
commit 73a4a9fb93
7 changed files with 12 additions and 0 deletions

View File

@ -929,6 +929,7 @@ function runUpdateUsingService(aInitialStatus, aExpectedStatus,
// Override the update root directory
gEnvUpdateRootOverride = updatesDir.path;
gEnvAppDirOverride = getApplyDirFile(null).path;
gEnvSKipUpdateDirHashing = true;
if (gSwitchApp) {
// We want to set the env vars again
@ -2141,6 +2142,7 @@ let gEnvDyldLibraryPath;
let gEnvLdLibraryPath;
let gEnvUpdateRootOverride = null;
let gEnvAppDirOverride = null;
let gEnvSKipUpdateDirHashing = false;
/**
* Sets the environment that will be used by the application process when it is
@ -2220,6 +2222,10 @@ function setEnvironment() {
env.set("XPCOM_DEBUG_BREAK", "warn");
if (IS_WIN && gEnvSKipUpdateDirHashing) {
env.set("MOZ_UPDATE_NO_HASH_DIR", "1");
}
if (gEnvUpdateRootOverride) {
logTestInfo("setting the MOZ_UPDATE_ROOT_OVERRIDE environment variable to " +
gEnvUpdateRootOverride + "\n");

View File

@ -46,6 +46,7 @@ function run_test() {
return;
}
gEnvSKipUpdateDirHashing = true;
let channel = Services.prefs.getCharPref(PREF_APP_UPDATE_CHANNEL);
let patches = getLocalPatchString(null, null, null, null, null, "true",
STATE_PENDING);

View File

@ -129,6 +129,7 @@ function run_test() {
// Don't attempt to show a prompt when the update is finished.
Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, true);
gEnvSKipUpdateDirHashing = true;
let channel = Services.prefs.getCharPref(PREF_APP_UPDATE_CHANNEL);
let patches = getLocalPatchString(null, null, null, null, null, "true",
STATE_PENDING);

View File

@ -137,6 +137,7 @@ function run_test() {
// Don't attempt to show a prompt when the update is finished.
Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, true);
gEnvSKipUpdateDirHashing = true;
let channel = Services.prefs.getCharPref(PREF_APP_UPDATE_CHANNEL);
let patches = getLocalPatchString(null, null, null, null, null, "true",
STATE_PENDING);

View File

@ -39,6 +39,7 @@ function run_test() {
return;
}
gEnvSKipUpdateDirHashing = true;
let channel = Services.prefs.getCharPref(PREF_APP_UPDATE_CHANNEL);
let patches = getLocalPatchString(null, null, null, null, null, "true",
STATE_PENDING);

View File

@ -128,6 +128,7 @@ function run_test() {
// Don't attempt to show a prompt when the update is finished.
Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, true);
gEnvSKipUpdateDirHashing = true;
let channel = Services.prefs.getCharPref(PREF_APP_UPDATE_CHANNEL);
let patches = getLocalPatchString(null, null, null, null, null, "true",
STATE_PENDING_SVC);

View File

@ -136,6 +136,7 @@ function run_test() {
// Don't attempt to show a prompt when the update is finished.
Services.prefs.setBoolPref(PREF_APP_UPDATE_SILENT, true);
gEnvSKipUpdateDirHashing = true;
let channel = Services.prefs.getCharPref(PREF_APP_UPDATE_CHANNEL);
let patches = getLocalPatchString(null, null, null, null, null, "true",
STATE_PENDING_SVC);