We're in a situation where:
mActiveWindow = the top level window
mFocusedWindow = nullptr
Front-end calls promiseFocus(), and document.hasFocus() returns false
(correctly).
So it proceeds to call window.focus(), but that bails out in RaiseWindow
here:
https://searchfox.org/mozilla-central/rev/234f91a9d3ebef0d514868701cfb022d5f199cb5/dom/base/nsFocusManager.cpp#3022
I think bailing out is wrong and we should ensure the window becomes
focused as well.
Differential Revision: https://phabricator.services.mozilla.com/D230432