Make sure notifications don't get lost when ServiceWorker goes inactive/active
Background / User story
This is a follow-up to #1071 (closed).
We must ensure that notifications don't get swallowed by the ServiceWorker going away.
Right now, if we want to show the user a notification, and the ServiceWorker goes inactive (right after we start the animation to point the user to the notification), it might happen that the notification gets lost without the user ever realizing it was there.
We need to make sure that if a notification is supposed to be shown, it still is shown after a ServiceWorker idle state change. And, we need to make sure that the icon is not in weird state (like half blue, half red) and that the icon animation makes sense. (Can confirm that the icon gets reset on ServiceWorker restart.)
What to change
- Design: N/A
- Research: N/A
- Spec: N/A
- Legal: N/A
- Development: See #1072 (closed).
Hints for testers
Check if notifications survive when manually deactivating the ServiceWorker.
Potential breakage:
- No new tab is created in response to "newtab"-type notification, even after opening a new empty tab.
- Clicking on notification or a button in the notification has no effect.
- Notification is not being dismissed when it's being closed.
- Language recommendation feature doesn't show any notifications.
Hints for translators
N/A