Whenever an event is to be expected after a synthesized mouse or keyboard action, the Promise for the event should be created beforehand. Otherwise there is a chance that the event is missed.
Bug 1927281 Comment 13 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
This patch tries to check expected conditions more often while the test progresses, in order to better see where it fails. It also waits for all expected `MsgLoaded` events.