Backed out changeset 88a641ee5cbe (bug 1007057) for frequent test timeouts.
authorRyan VanderMeulen <ryanvm@gmail.com>
Sat, 07 Jun 2014 01:16:08 -0400
changeset 206625 2ff4cebbcd43d41308284f5a1bfa514000c0de9c
parent 206624 e62ac37ca662110501929c02cba280ea4a949b83
child 206626 647c3ef8fcaf1128096c1b989c0c1f94b18e64b5
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1007057
milestone32.0a1
backs out88a641ee5cbe8a92fb784efd66c16af4091f2e63
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 88a641ee5cbe (bug 1007057) for frequent test timeouts. CLOSED TREE
browser/app/profile/firefox.js
browser/devtools/moz.build
browser/devtools/webide/content/webide.js
browser/devtools/webide/test/head.js
browser/devtools/webide/test/test_cli.html
browser/devtools/webide/test/test_import.html
browser/devtools/webide/test/test_runtime.html
browser/installer/package-manifest.in
configure.in
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1232,18 +1232,22 @@ pref("devtools.toolbar.enabled", true);
 pref("devtools.toolbar.visible", false);
 pref("devtools.commands.dir", "");
 
 // Enable the app manager
 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);
 pref("devtools.toolbox.sidebar.width", 500);
 pref("devtools.toolbox.host", "bottom");
 pref("devtools.toolbox.selectedTool", "webconsole");
 pref("devtools.toolbox.toolbarSpec", '["splitconsole", "paintflashing toggle","tilt toggle","scratchpad","resize toggle","eyedropper","screenshot --fullpage"]');
 pref("devtools.toolbox.sideEnabled", true);
--- a/browser/devtools/moz.build
+++ b/browser/devtools/moz.build
@@ -23,17 +23,19 @@ DIRS += [
     'shadereditor',
     'shared',
     'sourceeditor',
     'styleeditor',
     'styleinspector',
     'tilt',
     'webaudioeditor',
     'webconsole',
-    'webide',
 ]
 
+if CONFIG['MOZ_DEVTOOLS_WEBIDE']:
+    DIRS += ['webide']
+
 EXTRA_COMPONENTS += [
     'devtools-clhandler.js',
     'devtools-clhandler.manifest',
 ]
 
 JAR_MANIFESTS += ['jar.mn']
--- a/browser/devtools/webide/content/webide.js
+++ b/browser/devtools/webide/content/webide.js
@@ -152,24 +152,22 @@ let UI = {
     this.hidePanels();
     document.querySelector("window").classList.add("busy")
     this.updateCommands();
   },
 
   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);
     }, 30000);
     this.busy();
     promise.then(() => {
       clearTimeout(timeout);
       this.unbusy();
--- a/browser/devtools/webide/test/head.js
+++ b/browser/devtools/webide/test/head.js
@@ -57,25 +57,27 @@ function closeWebIDE(win) {
   });
 
   win.close();
 
   return deferred.promise;
 }
 
 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(() => {
     deferred.resolve();
   });
 
   return deferred.promise;
 }
--- a/browser/devtools/webide/test/test_cli.html
+++ b/browser/devtools/webide/test/test_cli.html
@@ -14,22 +14,25 @@
 
   <body>
 
     <script type="application/javascript;version=1.8">
       window.onload = function() {
         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;
           yield win.handleCommandline(cli);
 
           let project = win.AppManager.selectedProject;
           is(project.location, packagedAppLocation, "Project imported");
 
--- a/browser/devtools/webide/test/test_import.html
+++ b/browser/devtools/webide/test/test_import.html
@@ -17,19 +17,16 @@
     <script type="application/javascript;version=1.8">
       window.onload = function() {
         SimpleTest.waitForExplicitFinish();
 
         Task.spawn(function* () {
             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;
             is(project.location, packagedAppLocation, "Location is valid");
             is(project.name, "A name (in app directory)", "name field has been updated");
             is(project.manifest.launch_path, "/index.html", "manifest found. launch_path valid.");
             is(project.manifest.description, "desc", "manifest found. description valid");
 
--- a/browser/devtools/webide/test/test_runtime.html
+++ b/browser/devtools/webide/test/test_runtime.html
@@ -44,61 +44,71 @@
 
             getName: function() {
               return "fakeRuntime";
             }
           });
 
           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");
           is(items.length, 1, "Found one runtime button");
 
           let deferred = promise.defer();
           win.AppManager.connection.once(
               win.Connection.Events.CONNECTED,
               () => deferred.resolve());
 
           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();
 
           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(
               win.Connection.Events.CONNECTED,
               () => deferred.resolve());
 
           win.document.querySelectorAll(".runtime-panel-item-custom")[1].click();
 
@@ -107,18 +117,16 @@
           is(Object.keys(DebuggerServer._connections).length, 1, "Locally connected");
 
           yield win.Cmds.disconnectRuntime();
 
           yield closeWebIDE(win);
 
           DebuggerServer.destroy();
 
-          yield removeAllProjects();
-
           SimpleTest.finish();
 
         });
       }
 
 
     </script>
   </body>
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -633,19 +633,21 @@
 @BINPATH@/chrome/recording/*
 #ifdef MOZ_GTK
 @BINPATH@/browser/chrome/icons/default/default16.png
 @BINPATH@/browser/chrome/icons/default/default32.png
 @BINPATH@/browser/chrome/icons/default/default48.png
 #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
 #ifndef XP_MACOSX
 ; shell icons
 @BINPATH@/browser/icons/*.png
 #ifdef MOZ_UPDATER
 ; updater icon
--- a/configure.in
+++ b/configure.in
@@ -7675,16 +7675,29 @@ if test "$MOZ_CHROME_FILE_FORMAT" = "sym
 fi
 
 if test "$MOZ_CHROME_FILE_FORMAT" != "jar" &&
     test "$MOZ_CHROME_FILE_FORMAT" != "flat" &&
     test "$MOZ_CHROME_FILE_FORMAT" != "omni"; then
     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 =========================================================
 dnl Omnijar packaging is compatible with flat packaging.
 dnl In unpackaged builds, omnijar looks for files as if
 dnl things were flat packaged. After packaging, all files
 dnl are loaded from a single jar. MOZ_CHROME_FILE_FORMAT
 dnl is set to flat since putting files into jars is only