зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1287007 - Fix timing issue in test_delay_update_webextension.js r=rhelmer
The onUpdateAvailable listener is asynchronously notified, so the caller (i.e. the test) cannot assume that a message sent immediately after triggering an update would trigger the `browser.test.onMessage` listener that was added in the onUpdateAvailable event handler. MozReview-Commit-ID: 12n64f5l3RA --HG-- extra : rebase_source : 6ba7923359786c4ccd7f4d29664a8567e253e0cd
This commit is contained in:
Родитель
3992652f2f
Коммит
c3c9744957
|
@ -214,6 +214,7 @@ add_task(function* delay_updates_defer() {
|
|||
browser.test.fail(`wrong message: ${msg}`);
|
||||
}
|
||||
});
|
||||
browser.test.sendMessage("truly ready");
|
||||
});
|
||||
browser.test.sendMessage("ready");
|
||||
},
|
||||
|
@ -249,6 +250,7 @@ add_task(function* delay_updates_defer() {
|
|||
do_check_eq(addon_postponed.type, "extension");
|
||||
|
||||
// add-on will not allow upgrade until message is received
|
||||
yield extension.awaitMessage("truly ready");
|
||||
extension.sendMessage("allow");
|
||||
yield extension.awaitFinish("allowed");
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче