Bug 1097833 - Move local runtime behind a pref again. r=paul

This commit is contained in:
J. Ryan Stinnett 2014-11-19 07:41:42 -06:00
parent a091782c5d
commit 8d79354e59
3 changed files with 10 additions and 1 deletions

View File

@ -359,7 +359,13 @@ let StaticScanner = {
enable() {},
disable() {},
scan() { return promise.resolve(); },
listRuntimes() { return [gRemoteRuntime, gLocalRuntime]; }
listRuntimes() {
let runtimes = [gRemoteRuntime];
if (Services.prefs.getBoolPref("devtools.webide.enableLocalRuntime")) {
runtimes.push(gLocalRuntime);
}
return runtimes;
}
};
EventEmitter.decorate(StaticScanner);

View File

@ -22,6 +22,7 @@ if (window.location === "chrome://browser/content/browser.xul") {
}
Services.prefs.setBoolPref("devtools.webide.enabled", true);
Services.prefs.setBoolPref("devtools.webide.enableLocalRuntime", true);
Services.prefs.setCharPref("devtools.webide.addonsURL", TEST_BASE + "addons/simulators.json");
Services.prefs.setCharPref("devtools.webide.simulatorAddonsURL", TEST_BASE + "addons/fxos_#SLASHED_VERSION#_simulator-#OS#.xpi");
@ -32,6 +33,7 @@ Services.prefs.setCharPref("devtools.webide.templatesURL", TEST_BASE + "template
SimpleTest.registerCleanupFunction(() => {
Services.prefs.clearUserPref("devtools.webide.enabled");
Services.prefs.clearUserPref("devtools.webide.enableLocalRuntime");
Services.prefs.clearUserPref("devtools.webide.autoinstallADBHelper");
Services.prefs.clearUserPref("devtools.webide.autoinstallFxdtAdapters");
});

View File

@ -12,6 +12,7 @@ pref("devtools.webide.autoinstallFxdtAdapters", true);
pref("devtools.webide.autoinstallFxdtAdapters", false);
#endif
pref("devtools.webide.restoreLastProject", true);
pref("devtools.webide.enableLocalRuntime", false);
pref("devtools.webide.addonsURL", "https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/index.json");
pref("devtools.webide.simulatorAddonsURL", "https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/#VERSION#/#OS#/fxos_#SLASHED_VERSION#_simulator-#OS#-latest.xpi");
pref("devtools.webide.simulatorAddonID", "fxos_#SLASHED_VERSION#_simulator@mozilla.org");