Im writing an extension that allows a user to automate test cases in Firefox, and I need to track how many open windows a user has created during a "recording session" to do this I created observer that watches for two topics: domwindowclosed and domwindowopened. When the final window is closed down I fire an event specific to my application.
I have a test case where a page has two links that both have target "_blank" ie: <a target="_blank"....</a> <a target="_blank"....</a> The problem is that if I click both those links in the same test case, when closing down the browser windows, domwindowclosed doesnt fire at all for the last window (order does not seem to matter). This does not happen if I name the targets <a target="new_win"....</a> <a target="newer_win"....</a> I've also tried using the nsIWindowMediator interface and adding a nsIWindowMediatorListener that also keeps track of opened windows, and the same problem occurs. Am I not setting up the observer correctly? I only add it if the observer service returns an empty enumeration when queried for either domwindowclosed or domwindowopened. Any help would be greatly appreciated. _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
