browser tests: Propagate task function name in addAccessibleTask
Categories
(Core :: Disability Access APIs, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox135 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
Details
Attachments
(1 file)
When you add a task in a browser test, you can give it a name:
add_task(async function testTabStopsNoPageWithHomeButton() {
When you do this, it shows up in the test run output:
0:17.90 INFO Entering test bound testTabStopsNoPageWithHomeButton
For a11y tests, we use addAccessibleTask:
addAccessibleTask(`...`, async function testProtected(browser, docAcc) {
But that doesn't propagate the name:
0:39.16 INFO Entering test bound
This makes it more time consuming to figure out which test you're dealing with if the test doesn't specifically output some identifying info. The task function name should be propagated so that this works.
| Assignee | ||
Comment 1•1 year ago
|
||
For a11y browser tests, we use addAccessibleTask:
addAccessibleTask(`...`, async function testProtected(browser, docAcc) {
Previously, the task function name (e.g. testProtected) didn't appear in test run output:
0:39.16 INFO Entering test bound
Even though the function is named, addAccessibleTask wraps it in an anonymous function, so the test harness can't get the original name.
This patch overrides the name of the wrapper function to match the name of the supplied task function, resulting in test run output like this:
0:39.16 INFO Entering test bound testProtected
This should make it easier to determine what test you're dealing with when examining test run output.
Comment 3•1 year ago
|
||
| bugherder | ||
Description
•