Bug 851557: waiting for windows to close before ending tests