Focus left on a tab by a browser-chrome test leaks into the next test
Categories
(Testing :: Mochitest, defect)
Tracking
(firefox162 fixed)
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Between browser-chrome tests, nextTest in testing/mochitest/browser-test.js replaces the selected tab with about:blank, but it doesn't reset focus. When a test leaves focus on a tab in the tab strip, the new tab inherits that focus and becomes the tab strip's keyboard-focused item (tablist-keyboard-focus). The next test then starts with the page unfocused.
This makes these tests fail when they run twice in a row (--repeat, and the upcoming mochitest-repeat jobs):
browser_edit_profile_test.js(bug 1943014)browser_tab_splitview_keyboard_focus.jsbrowser_tab_a11y_description.js
Tests start with gBrowser.selectedBrowser focused. The fix focuses it again before the harness replaces the tab between tests.
| Assignee | ||
Comment 1•13 days ago
|
||
Tests start with the selected browser focused, but replacing the tab between tests does not reset focus. A test that leaves focus on a tab in the tab strip hands it to the next test's tab, which then starts with the page unfocused and the tab strip keyboard-focused. This also applies to --repeat runs.
Comment 3•9 days ago
|
||
| bugherder | ||
Description
•