Closed Bug 1276214 Opened 4 years ago Closed 1 year ago

Add an interface to mock notifications events

Categories

(WebExtensions :: Frontend, enhancement, P5)

enhancement

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: bsilverberg, Unassigned)

References

Details

(Whiteboard: [notifications])

As per https://bugzilla.mozilla.org/show_bug.cgi?id=1275363#c8, we cannot really test the code in `emitAndDelete` because the only real event we can trigger in a test is `onClosed`, via `clear`, but `clear` itself also deletes the notification.

[1] https://dxr.mozilla.org/mozilla-central/source/toolkit/components/extensions/ext-notifications.js#57
Priority: -- → P3
Whiteboard: triaged
Whiteboard: triaged → [notifications]triaged
Component: WebExtensions: Untriaged → WebExtensions: Frontend
Priority: P3 → P5
Whiteboard: [notifications]triaged → [notifications]
Product: Toolkit → WebExtensions

Such test interface was already added in bug 1398518.

The first patch to bug 1559697 adds test coverage for the scenario of click/close events and verifying that the notification map has indeed been cleared.

Status: NEW → RESOLVED
Type: defect → enhancement
Closed: 1 year ago
Resolution: --- → WORKSFORME
See Also: → 1398518
You need to log in before you can comment on or make changes to this bug.