Bug 1007057 - build appmgr v2: remove configure option. r=mshal r=ochameau

This commit is contained in:
Paul Rouget 2014-06-06 12:01:52 +08:00
parent e4378488b1
commit b7bf28a4e9
9 changed files with 25 additions and 54 deletions

View File

@ -1237,12 +1237,8 @@ pref("devtools.appmanager.enabled", true);
pref("devtools.appmanager.lastTab", "help"); pref("devtools.appmanager.lastTab", "help");
pref("devtools.appmanager.manifestEditor.enabled", true); pref("devtools.appmanager.manifestEditor.enabled", true);
// Enable devtools webide // Disable devtools webide until bug 1007059
#ifdef MOZ_DEVTOOLS_WEBIDE
pref("devtools.webide.enabled", true);
#else
pref("devtools.webide.enabled", false); pref("devtools.webide.enabled", false);
#endif
// Toolbox preferences // Toolbox preferences
pref("devtools.toolbox.footer.height", 250); pref("devtools.toolbox.footer.height", 250);

View File

@ -28,11 +28,9 @@ DIRS += [
'tilt', 'tilt',
'webaudioeditor', 'webaudioeditor',
'webconsole', 'webconsole',
'webide',
] ]
if CONFIG['MOZ_DEVTOOLS_WEBIDE']:
DIRS += ['webide']
EXTRA_COMPONENTS += [ EXTRA_COMPONENTS += [
'devtools-clhandler.js', 'devtools-clhandler.js',
'devtools-clhandler.manifest', 'devtools-clhandler.manifest',

View File

@ -157,12 +157,14 @@ let UI = {
unbusy: function() { unbusy: function() {
document.querySelector("window").classList.remove("busy") document.querySelector("window").classList.remove("busy")
this.updateCommands(); this.updateCommands();
this._busyPromise = null;
}, },
busyUntil: function(promise, operationDescription) { busyUntil: function(promise, operationDescription) {
// Freeze the UI until the promise is resolved. A 30s timeout // Freeze the UI until the promise is resolved. A 30s timeout
// will unfreeze the UI, just in case the promise never gets // will unfreeze the UI, just in case the promise never gets
// resolved. // resolved.
this._busyPromise = promise;
let timeout = setTimeout(() => { let timeout = setTimeout(() => {
this.unbusy(); this.unbusy();
UI.reportError("error_operationTimeout", operationDescription); UI.reportError("error_operationTimeout", operationDescription);

View File

@ -62,17 +62,15 @@ function closeWebIDE(win) {
} }
function removeAllProjects() { function removeAllProjects() {
let deferred = promise.defer(); return Task.spawn(function* () {
AppProjects.load().then(() => { yield AppProjects.load();
let projects = AppProjects.store.object.projects; let projects = AppProjects.store.object.projects;
for (let i = 0; i < projects.length; i++) { for (let i = 0; i < projects.length; i++) {
AppProjects.remove(projects[i].location); yield AppProjects.remove(projects[i].location);
} }
deferred.resolve();
}); });
return deferred.promise;
} }
function nextTick() { function nextTick() {
let deferred = promise.defer(); let deferred = promise.defer();
SimpleTest.executeSoon(() => { SimpleTest.executeSoon(() => {

View File

@ -19,15 +19,12 @@
SimpleTest.waitForExplicitFinish(); SimpleTest.waitForExplicitFinish();
Task.spawn(function* () { Task.spawn(function* () {
let clClass = Components.classes["@mozilla.org/toolkit/command-line;1"].createInstance();
Cu.import("resource://gre/modules/devtools/dbg-server.jsm"); Cu.import("resource://gre/modules/devtools/dbg-server.jsm");
DebuggerServer.init(function () { return true; }); DebuggerServer.init(function () { return true; });
DebuggerServer.addBrowserActors(); DebuggerServer.addBrowserActors();
let win = yield openWebIDE(); let win = yield openWebIDE();
let packagedAppLocation = getTestFilePath("app"); let packagedAppLocation = getTestFilePath("app");
let cli = "actions=addPackagedApp&location=" + packagedAppLocation; let cli = "actions=addPackagedApp&location=" + packagedAppLocation;

View File

@ -22,6 +22,9 @@
let win = yield openWebIDE(); let win = yield openWebIDE();
let packagedAppLocation = getTestFilePath("app"); let packagedAppLocation = getTestFilePath("app");
yield win.AppProjects.load();
is(win.AppProjects.store.object.projects.length, 0, "IDB is empty");
yield win.Cmds.importPackagedApp(packagedAppLocation); yield win.Cmds.importPackagedApp(packagedAppLocation);
let project = win.AppManager.selectedProject; let project = win.AppManager.selectedProject;

View File

@ -49,10 +49,9 @@
win.AppManager.update("runtimelist"); win.AppManager.update("runtimelist");
let hostedAppManifest = TEST_BASE + "hosted_app.manifest"; let packagedAppLocation = getTestFilePath("app");
yield win.Cmds.importHostedApp(hostedAppManifest);
yield win.Cmds.showRuntimePanel(); yield win.Cmds.importPackagedApp(packagedAppLocation);
let panelNode = win.document.querySelector("#runtime-panel"); let panelNode = win.document.querySelector("#runtime-panel");
let items = panelNode.querySelectorAll(".runtime-panel-item-usb"); let items = panelNode.querySelectorAll(".runtime-panel-item-usb");
@ -65,36 +64,27 @@
items[0].click(); items[0].click();
yield deferred.promise; ok(win.document.querySelector("window").className, "busy", "UI is busy");
yield win.UI._busyPromise;
is(Object.keys(DebuggerServer._connections).length, 1, "Connected"); is(Object.keys(DebuggerServer._connections).length, 1, "Connected");
ok(isPlayActive(), "play button is enabled 1");
ok(!isStopActive(), "stop button is disabled 1");
let oldProject = win.AppManager.selectedProject;
win.AppManager.selectedProject = null;
yield nextTick(); yield nextTick();
ok(!isPlayActive(), "play button is disabled 2"); ok(!isPlayActive(), "play button is disabled 2");
ok(!isStopActive(), "stop button is disabled 2"); ok(!isStopActive(), "stop button is disabled 2");
win.AppManager._selectedProject = oldProject;
win.AppManager.selectedProject.errorsCount = 0;
win.UI.updateCommands(); win.UI.updateCommands();
yield nextTick(); yield nextTick();
ok(isPlayActive(), "play button is enabled 3"); ok(isPlayActive(), "play button is enabled 3");
ok(!isStopActive(), "stop button is disabled 3"); ok(!isStopActive(), "stop button is disabled 3");
let oldProject = win.AppManager.selectedProject;
win.AppManager.selectedProject = null;
yield nextTick();
ok(!isPlayActive(), "play button is disabled 4");
ok(!isStopActive(), "stop button is disabled 4");
win.AppManager._selectedProject = oldProject;
win.UI.updateCommands();
yield nextTick();
ok(isPlayActive(), "play button is enabled 5");
ok(!isStopActive(), "stop button is disabled 5");
yield win.Cmds.disconnectRuntime(); yield win.Cmds.disconnectRuntime();
@ -102,8 +92,8 @@
is(Object.keys(DebuggerServer._connections).length, 0, "Disconnected"); is(Object.keys(DebuggerServer._connections).length, 0, "Disconnected");
ok(win.AppManager.selectedProject, "A project is still selected"); ok(win.AppManager.selectedProject, "A project is still selected");
ok(!isPlayActive(), "play button is disabled 6"); ok(!isPlayActive(), "play button is disabled 4");
ok(!isStopActive(), "stop button is disabled 6"); ok(!isStopActive(), "stop button is disabled 4");
deferred = promise.defer(); deferred = promise.defer();
win.AppManager.connection.once( win.AppManager.connection.once(
@ -122,6 +112,8 @@
DebuggerServer.destroy(); DebuggerServer.destroy();
yield removeAllProjects();
SimpleTest.finish(); SimpleTest.finish();
}); });

View File

@ -636,11 +636,9 @@
#endif #endif
; [Webide Files] ; [Webide Files]
#ifdef MOZ_DEVTOOLS_WEBIDE
@BINPATH@/browser/chrome/webide@JAREXT@ @BINPATH@/browser/chrome/webide@JAREXT@
@BINPATH@/browser/chrome/webide.manifest @BINPATH@/browser/chrome/webide.manifest
@BINPATH@/browser/@PREF_DIR@/webide-prefs.js @BINPATH@/browser/@PREF_DIR@/webide-prefs.js
#endif
; shell icons ; shell icons
#ifdef XP_UNIX #ifdef XP_UNIX

View File

@ -7680,19 +7680,6 @@ if test "$MOZ_CHROME_FILE_FORMAT" != "jar" &&
AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, or omni]) AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, or omni])
fi fi
dnl ========================================================
dnl = Enable Support for devtools webide
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(devtools-webide,
[ --enable-devtools-webide Set compile flags necessary for compiling devtools webide ],
MOZ_DEVTOOLS_WEBIDE=1,
MOZ_DEVTOOLS_WEBIDE= )
if test -n "$MOZ_DEVTOOLS_WEBIDE"; then
AC_DEFINE(MOZ_DEVTOOLS_WEBIDE)
fi
AC_SUBST(MOZ_DEVTOOLS_WEBIDE)
dnl ========================================================= dnl =========================================================
dnl Omnijar packaging (bug 552121) dnl Omnijar packaging (bug 552121)
dnl ========================================================= dnl =========================================================