mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1065185 - Fix extension manager test. r=bz
This commit is contained in:
parent
8772fe7363
commit
0917859648
@ -60,11 +60,11 @@
|
||||
"http://mochi.test:8888/tests/toolkit/mozapps/extensions/test/mochitest/file_bug687194.xpi"
|
||||
AddonManager.getInstallForURL(INSTALL_URI, (install) => {
|
||||
install = SpecialPowers.wrap(install);
|
||||
install.addListener({
|
||||
install.addListener(SpecialPowers.wrapCallbackObject({
|
||||
onInstallEnded: function(install, addon) {
|
||||
SimpleTest.executeSoon(() => test.next(addon));
|
||||
}
|
||||
});
|
||||
}));
|
||||
install.install();
|
||||
}, "application/x-xpinstall");
|
||||
|
||||
@ -75,14 +75,14 @@
|
||||
lastResult = yield;
|
||||
is(lastResult.threw, false, "able to resolve after the installation");
|
||||
|
||||
let listener = {
|
||||
let listener = SpecialPowers.wrapCallbackObject({
|
||||
onUninstalled: function(removedAddon) {
|
||||
if (SpecialPowers.wrap(removedAddon).id === addon.id) {
|
||||
if (removedAddon.id === addon.id) {
|
||||
AddonManager.removeAddonListener(listener);
|
||||
SimpleTest.executeSoon(() => test.next());
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
AddonManager.addAddonListener(listener);
|
||||
addon.uninstall();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user