alarms.clearAll should return undefined instead of a boolean
Categories
(WebExtensions :: General, task, P3)
Tracking
(firefox157 fixed)
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: robwu, Assigned: ollie, Mentored)
References
Details
(Keywords: dev-doc-complete, good-first-bug, Whiteboard: [wecg], [wptsync upstream])
Attachments
(1 external file)
In the WECG we just reached consensus that the alarms.clearAll method should return undefined (or more precisely: a Promise resolving to undefined), instead of the current boolean true/false.
Implementing that is fairly simple:
- drop the type at https://searchfox.org/firefox-main/rev/543bce9ee58f21e87c5fba0e1865d3b3c6aa27bd/toolkit/components/extensions/schemas/alarms.json#147-153
- Remove https://searchfox.org/firefox-main/rev/543bce9ee58f21e87c5fba0e1865d3b3c6aa27bd/toolkit/components/extensions/parent/ext-alarms.js#141,144,146
- fix up the expectations in unit tests: https://searchfox.org/firefox-main/rev/543bce9ee58f21e87c5fba0e1865d3b3c6aa27bd/toolkit/components/extensions/test/xpcshell/test_ext_alarms.js#174-175
- If not already fixed up (by another browser who moves first), fix up the wpt test expectation at: https://searchfox.org/firefox-main/rev/543bce9ee58f21e87c5fba0e1865d3b3c6aa27bd/testing/web-platform/tests/web-extensions/resources/alarms/background.js#60-61
Interestingly, the current tests only assert that the return value is true, never the case for false. That already shows that the decision in the WECG is the right one - we did not even have test coverage for the false value.
dev-doc-needed: once the fix has landed we should document the new behavior on MDN.
| Reporter | ||
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
I'd like to work on this if no one else is looking into it :)
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/62518 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Documentation requirements addressed in-
- (BCD) Bug 2067229 alarms.clearAll returns undefined note #30450
- (content) Bug 2067229 alarms.clearAll returns undefined #45554
Description
•