Open Bug 1978353 Opened 9 months ago Updated 4 months ago

For tests on Windows, newly opened windows might not immediately be visible

Categories

(Core :: Widget: Win32, defect, P3)

defect

Tracking

()

People

(Reporter: vhilla, Unassigned)

References

Details

Attachments

(2 files)

See bug 1976026. I think this is a windows-only issue.

I got the perception that sometimes, the new window will be briefly occluded by an old window before being raised to foreground. In the logs, you either see one call to RecomputeAppWindowVisibility for hiding the old window, or three calls for new one being occluded, hiding the old one, showing the new one. I'm unsure if this has ever been a problem. On current central, it seems to me that all this happens before openNewBrowserWindow resolves. So it doesn't seem to be an issue.

But while working on bug 543435, I occasionally had new windows not immediately visible. Visibility is updated asynchronously (code) and the third call to RecomputeAppWindowVisibility will cause a task to update the new window to visible to be scheduled. My guess is that due to the work in bug 543435, the initial content about:blank document loads a tick faster and that task to change visibility hasn't run yet when openNewBrowserWindow resolves. To my knowledge, nothing actually guarantees that the new window is visible.

I'm uncertain if we generally want to guarantee the new window is visible, of if this is feasible. I.e. if one opens multiple windows simultaneously, not all of them become visible.

I'll attach two logs from central.

See Also: → sync-about-blank, 1976026
Priority: -- → P3
Blocks: 2002097

This bug also occurred in Webdriver BiDi (bug 2002097), so it's not unique to BrowserTestUtils.

Type: enhancement → defect
Component: General → Widget
Product: Firefox → Core
Summary: BrowserTestUtils.openNewBrowserWindow might not immediately be visible → For tests on Windows, newly opened windows might not immediately be visible
Component: Widget → Widget: Win32
Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: