Backed out changeset 88a641ee5cbe (bug 1007057) for frequent test timeouts.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2014-06-07 01:16:08 -04:00
Родитель acc1b223a0
Коммит 52d3bc7564
9 изменённых файлов: 54 добавлений и 25 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -7680,6 +7680,19 @@ if test "$MOZ_CHROME_FILE_FORMAT" != "jar" &&
AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, or omni])
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 Omnijar packaging (bug 552121)
dnl =========================================================