A method for stabilizing an event queue during a graphical user interface test
includes placing a test event on a tail of the event queue, generating a first
empty event associated with the test event, placing the first empty event on the
tail behind the test event, processing the test event off a head of the event queue,
checking the event queue behind the first empty event for a later event, removing
the first empty event if the later event is detected, processing the first empty
event off the head of the event queue, and placing a second empty event associated
with the test event on the tail of the event queue.