Bug 831933: Use a window tracker to detect the newloy opened windows instead of getMostRecentWindow.
Bug 831933: Verify we got the correct raw windows in the test.
Merge pull request #762 from Mossop/bug831933_3

Bug 831933: Use a window tracker to detect the newly opened windows instead of getMostRecentWindow. r=ochameau