Such testing would be greatly facilitated by manually requesting immediate suspend of the background script.
How to do this in Firefox?
The reason to only "request" suspend is because of this:
... so testing this properly requires not forcing suspend in situations where an automatic suspend attempt would have been cancelled.https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onSuspend wrote:Note: If something prevents the event page from being unloaded, the runtime.onSuspendCanceled event will be sent and the page won't be unloaded.
Thanks for any ideas.