зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1287007 - Fix test_ext_management_uninstall_self.js r=bsilverberg
The test logic was broken by design: Two tests uninstall the addon, but only one uninstall observer was used. Consequently, the second test resumes the test before the addon was actually uninstalled. It is probably sheer luck that the test worked before. MozReview-Commit-ID: DcT48ZQ2bRp --HG-- extra : rebase_source : 6ab304eab2c306106b5383726fbdf73775c5060a
This commit is contained in:
Родитель
ec11370338
Коммит
f81e1a59a2
|
@ -19,7 +19,7 @@ const manifest = {
|
|||
version: "1.0",
|
||||
};
|
||||
|
||||
const waitForUninstalled = new Promise(resolve => {
|
||||
const waitForUninstalled = () => new Promise(resolve => {
|
||||
const listener = {
|
||||
onUninstalled: (addon) => {
|
||||
equal(addon.id, id, "The expected add-on has been uninstalled");
|
||||
|
@ -67,7 +67,7 @@ add_task(function* test_management_uninstall_no_prompt() {
|
|||
let addon = yield promiseAddonByID(id);
|
||||
notEqual(addon, null, "Add-on is installed");
|
||||
extension.sendMessage("uninstall");
|
||||
yield waitForUninstalled;
|
||||
yield waitForUninstalled();
|
||||
yield extension.markUnloaded();
|
||||
Services.obs.notifyObservers(extension.extension.file, "flush-cache-entry", null);
|
||||
});
|
||||
|
@ -91,7 +91,7 @@ add_task(function* test_management_uninstall_prompt_uninstall() {
|
|||
let addon = yield promiseAddonByID(id);
|
||||
notEqual(addon, null, "Add-on is installed");
|
||||
extension.sendMessage("uninstall");
|
||||
yield waitForUninstalled;
|
||||
yield waitForUninstalled();
|
||||
yield extension.markUnloaded();
|
||||
|
||||
// Test localization strings
|
||||
|
|
Загрузка…
Ссылка в новой задаче