Bug 1033065 - Wait app to be uninstalled before starting the following test. r=myk

This commit is contained in:
Marco Castelluccio 2014-07-09 13:01:50 +02:00
parent 493349d4b5
commit c2d60766c0

View File

@ -37,8 +37,10 @@ function loadWebapp(manifest, parameters, onLoad) {
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);
});
});
}