Bug 1007057 - add logs to test in case of orange. r=pbrosset
authorPaul Rouget <paul@mozilla.com>
Thu, 12 Jun 2014 14:47:36 +0800
changeset 188335 3bd2b5b8e46d3ac6126ea217b5e268a7b6ca3616
parent 188334 3c709608bb8a0dc7e5f6caa2d041dbd9406731e5
child 188336 4f98802de6ce5396af692fcaab82955a5b32a932
child 188420 a9c9191dc93928c180bf61664404d640ba182059
push id26951
push useremorley@mozilla.com
push dateThu, 12 Jun 2014 14:07:43 +0000
treeherdermozilla-central@4f98802de6ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbrosset
bugs1007057
milestone33.0a1
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
Bug 1007057 - add logs to test in case of orange. r=pbrosset
browser/devtools/webide/content/webide.js
browser/devtools/webide/test/head.js
browser/devtools/webide/test/test_import.html
--- a/browser/devtools/webide/content/webide.js
+++ b/browser/devtools/webide/content/webide.js
@@ -163,16 +163,17 @@ let UI = {
   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);
+      promise.reject("promise timeout: " + operationDescription);
     }, 30000);
     this.busy();
     promise.then(() => {
       clearTimeout(timeout);
       this.unbusy();
     }, (e) => {
       clearTimeout(timeout);
       UI.reportError("error_operationFail", operationDescription);
--- a/browser/devtools/webide/test/head.js
+++ b/browser/devtools/webide/test/head.js
@@ -30,16 +30,17 @@ function openWebIDE() {
   let deferred = promise.defer();
 
   let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].getService(Ci.nsIWindowWatcher);
   let win = ww.openWindow(null, "chrome://webide/content/", "webide", "chrome,centerscreen,resizable", null);
 
   win.addEventListener("load", function onLoad() {
     win.removeEventListener("load", onLoad);
     info("WebIDE open");
+    SimpleTest.requestCompleteLog();
     SimpleTest.executeSoon(() => {
       deferred.resolve(win);
     });
   });
 
   return deferred.promise;
 }
 
--- a/browser/devtools/webide/test/test_import.html
+++ b/browser/devtools/webide/test/test_import.html
@@ -20,16 +20,19 @@
 
         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");
 
+            info("to call importPackagedApp(" + packagedAppLocation + ")");
+            ok(!win.UI._busyPromise, "UI is not busy");
+
             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");
 
@@ -53,16 +56,19 @@
             is(items[3].getAttribute("label"), "A name (in app directory)", "Panel label is correct");
             is(items[4].getAttribute("label"), "hosted manifest name property", "Panel label is correct");
 
             yield closeWebIDE(win);
 
             yield removeAllProjects();
 
             SimpleTest.finish();
+        }).then(null, e => {
+          ok(false, "Exception: " + e);
+          SimpleTest.finish();
         });
       }
 
 
     </script>
   </body>
 </html>