Open Bug 2095777 Opened 7 days ago Updated 23 hours ago

test_event_target_radius.html times out on its second run in the same browser (mochitest-plain-repeat)

Categories

(Core :: Layout, task)

task

Tracking

()

ASSIGNED

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

In the new mochitest-plain-repeat jobs, layout/base/tests/test_event_target_radius.html times out on its second run on macOS and Windows.

setupIframe sets the cross-origin src of #t14iframe right after un-hiding its container, without a layout flush. The new remote browser is only shown at the embedder's next refresh tick. On a warm second run the example.com document loads before that tick, so waitUntilApzStable → SimpleTest.promiseFocus focuses a document that isn't shown yet. nsFocusManager fires no focus event for it, and promiseFocus waits forever.

The fix flushes layout before setting src, so the remote browser is shown as soon as it is created.

Blocks: 2095794

The iframe's container is shown just before it navigates, so without a flush the remote browser is only shown at the embedder's next refresh tick, and on a warm second run in the same browser the load wins that race.

Awaiting an animation frame before setting src would also work, but only because that tick flushes layout after running the rAF callback; the flush is what the iframe needs.

Attachment #9687668 - Attachment description: Bug 2095777 - Flush layout before loading the cross-origin iframe in test_event_target_radius.html, r=#layout-reviewers. → Bug 2095777 - Let window.focus() focus the document of an iframe whose embedder is hidden or not laid out yet, r=#dom-core-reviewers,#layout-reviewers.
Attachment #9687668 - Attachment description: Bug 2095777 - Let window.focus() focus the document of an iframe whose embedder is hidden or not laid out yet, r=#dom-core-reviewers,#layout-reviewers. → Bug 2095777 - Let window.focus() focus the document of a frame whose embedder is hidden or not laid out yet, r=#dom-core-reviewers,#layout-reviewers.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: