Open
Bug 1432690
Opened 3 years ago
Updated 9 months ago
SimpleTest.registerCleanupFunction silently doesn't work in mochitest browser-chrome (bare registerCleanupFunction works)
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
NEW
People
(Reporter: MattN, Unassigned)
References
()
Details
Attachments
(1 file, 1 obsolete file)
If `registerCleanupFunction` is called on the `SimpleTest` object in a mochitest-browser-chrome test like: > SimpleTest.registerCleanupFunction(() => … ) then the callback is never called. Calling the bare function works fine: > registerCleanupFunction(() => … ) This is bad since devs expect it to work (and possibly it used to work). Examples of cleanup functions that are never called due to this bug: * https://dxr.mozilla.org/mozilla-central/search?q=SimpleTest.registerCleanupFunction+path%3Abrowser_&redirect=false * https://dxr.mozilla.org/mozilla-central/search?q=SimpleTest.registerCleanupFunction+path%3Ahead.js&redirect=false Possible solutions: 1) Fix `SimpleTest.registerCleanupFunction` to work with `registerCleanupFunction` 2) `SimpleTest.registerCleanupFunction` should throw if it's called in a browser-chrome test 3) `SimpleTest.registerCleanupFunction` shouldn't be defined in a browser-chrome test
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
| Comment hidden (off-topic) |
| Comment hidden (off-topic) |
Assignee: nobody → MattN+bmo
Status: NEW → ASSIGNED
| Reporter | ||
Updated•3 years ago
|
Attachment #8944973 -
Attachment is obsolete: true
| Comment hidden (off-topic) |
| Reporter | ||
Updated•3 years ago
|
Assignee: MattN+bmo → nobody
Status: ASSIGNED → NEW
| Assignee | ||
Updated•3 years ago
|
Component: BrowserTest → Mochitest
| Reporter | ||
Updated•10 months ago
|
Severity: major → --
Type: enhancement → defect
You need to log in
before you can comment on or make changes to this bug.
Description
•