See the comments as for this might be unexpected. The tests could be
fixed but seems like footgunny, so for now this seems better.
For future reference, the line causing the events getting dispatched to
the wrong document is the IsPrimaryFramePaintSuppressed call in
PuppetWidget::GetCurrentWidgetListener(), which causes
widget->DispatchEvent from nsContentUtils::SendMouseEvent to dispatch
the event to the wrong page.
Differential Revision: https://phabricator.services.mozilla.com/D109807