mozilla/addon-sdk — pull request #762 by Mossop (2013-02-04 19:36:47+00:00)
Title: Bug 831933: Use a window tracker to detect the newloy opened windows instead of getMostRecentWindow

So it looks like getMostRecentWindow is returning the wrong window, this screws up a lot of the test as we're waiting for the wrong windows to get focus. This change switches to use a window tracker to catch the new windows as they open. It passes consistently for me, though that doesn't say whether it really fixes it.

It does assume that the window tracker gets notified of the new window before the new tab load. I think that's a safe assumption.