Closed Bug 1816139 Opened 2 years ago Closed 2 years ago

Frequent hangs of browser/base/content/test/webrtc tests in headless mode

Categories

(Firefox :: Headless, defect)

defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

Details

Attachments

(3 files)

Run ./mach test browser/base/content/test/webrtc/ --headless and it will soon hang, waiting for a permission prompt to appear, which doesn't happen.

This is pretty old, and I landed a test-specific mitigation back then that didn't cover all cases.

This happens when the webrtc indicator appears as it takes focus from the browser window, and the prompt needs focus to appear.

This happens more frequently with webrtcLegacyIndicator.xhtml than webrtcIndicator.xhtml because the latter is only visible for display capture by default.

For me on linux, under headless, the legacy indicator is a toplevel WindowType::Popup widget whereas the new indicator is a toplevel WindowType::Dialog widget.

The root cause of this is HeadlessWidget taking focus when shown and being toplevel (or a dialog). The native webrtc indicator widgets do not take focus in this way.

Assignee: nobody → apehrson
Status: NEW → ASSIGNED

webrtcLegacyIndicator is a parentless window of type Popup, but should not
receive focus by default.

webrtcIndicator is an alwaysontop window of type Dialog or TopLevel, but should
not receive focus by default.

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/009858d01598 Undo focus mitigation from bug 1421724. r=karlt https://hg.mozilla.org/integration/autoland/rev/55cbddfeeaf3 In HeadlessWidget for default focus, check WindowType::TopLevel instead of mTopLevel. r=karlt https://hg.mozilla.org/integration/autoland/rev/bc669ecd9097 In HeadlessWidget don't by default focus alwaysontop windows. r=karlt
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: