These tests insert a <browser> into the DOM via tabbrowser, and
immediately try to get a hold to the underlying document right after.
However the a11y tree is constructed after frame construction, and with
bug 1584935 there's no longer a guarantee that it gets done in time
without these explicit flushes.
Note that I couldn't reproduce these failures locally, so take the
diagnostic with a grain of salt, but I believe it's accurate and that
this is the right fix.
Differential Revision: https://phabricator.services.mozilla.com/D75715