Bug 1033065 - Wait app to be uninstalled before starting the following test. r=myk
authorMarco Castelluccio <mar.castelluccio@studenti.unina.it>
Wed, 09 Jul 2014 13:01:50 +0200
changeset 193073 5c7d59444dcadba3c2535b5c4bce44d15c1ed344
parent 193072 30954594c1dd25aa7915bc9acdf7660efb5c8c8f
child 193074 b70458dc06645715da0a530c575935bb22cfa2bc
push id27107
push userryanvm@gmail.com
push dateWed, 09 Jul 2014 19:45:31 +0000
treeherdermozilla-central@6db315bcdb6a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmyk
bugs1033065
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 1033065 - Wait app to be uninstalled before starting the following test. r=myk
webapprt/test/chrome/head.js
--- a/webapprt/test/chrome/head.js
+++ b/webapprt/test/chrome/head.js
@@ -32,13 +32,15 @@ function loadWebapp(manifest, parameters
     }
     gAppBrowser.addEventListener("load", onLoadApp, true);
     gAppBrowser.setAttribute("src", WebappRT.launchURI);
   });
 
   registerCleanupFunction(function() {
     // We load DOMApplicationRegistry into a local scope to avoid appearing
     // to leak it.
-    let scope = {};
-    Cu.import("resource://gre/modules/Webapps.jsm", scope);
-    scope.DOMApplicationRegistry.uninstall(url.spec);
+    let { DOMApplicationRegistry } = Cu.import("resource://gre/modules/Webapps.jsm", {});
+
+    return new Promise(function(resolve, reject) {
+      DOMApplicationRegistry.uninstall(url.spec, resolve, reject);
+    });
   });
 }