Bug 851557: wait for selection before closing the opened window, then wait for the window to close before ending the test
Merge pull request #864 from erikvold/851557p3

Bug 851557: wait for selection before closing the opened window r=@zer0