HomePhabricator Dev

Bug 1568382 - wait for PiP window focus before resolving…

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Bug 1568382 - wait for PiP window focus before resolving triggerPictureInPicture. r=mconley

toolkit/components/pictureinpicture/tests/browser_fullscreen.js is
no longer intermittently failing to requestFullscreen() after this
change. The test was creating the PiP window with
triggerPictureInPicture and then immediately moving focus to the
original window where fullscreen is requested. It's possible that
the browser had not given focus to the PiP window yet and would do
so after the test had changed the focus. This would cause
requestFullscreen() to be called without focus on the proper
window.

We now wait for the PiP window to recieve focus before resolving
the promise returned by triggerPictureInPicture. This might
fix other intermittent tests if they rely on specific focus and
make use of this function.

Differential Revision: https://phabricator.services.mozilla.com/D93595

Details

Provenance
• smacleodAuthored on

Commit No Longer Exists

This commit no longer exists in the repository.