Hi,

In the course of debugging my patches for bug 715376, I've run across a 
peculiar bug that I lack the platform knowledge to explain.  In this test:

http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/browser_save_link-perwindowpb.js#25

a context menu is triggered on a link.  In failing tests, logs show that the 
synthesized mouse click happens and is then followed (immediately or shortly 
thereafter) by a focus out event on the window.  That focus out triggers this 
code:

http://mxr.mozilla.org/mozilla-central/source/widget/gtk2/nsWindow.cpp#2838

which, through various twists and turns, makes the menu disappear before the 
popupshown event handler is run.  The disappearance of the menu makes code in 
browser.xul unhappy (gContextMenu winds up |null|) and the test hangs.  
(Changing the handler to catch popupshowing makes the hangs go away, but that 
doesn't seem like what we want to test...)

The issue happens infrequently on my Linux machine (debug and opt) and 
repeatedly on Try.  I do not see what my modifications have to do with when 
focus events are triggered (and why the rogue focus event is only triggered 
occasionally).  These logs:

http://people.mozilla.com/~nfroyd/win-page-queues-log (successful run)
http://people.mozilla.com/~nfroyd/lose-page-queues-log (unsuccessful run)

contain information about events dispatched to the event queue (sans timer 
events) and various other bits of information (notably LOG and LOGFOCUS 
messages from nsWindow.cpp).  The areas of interest start around line 992 for 
win-page-queues-log and line 981 for lose-page-queues-log, where the mouse 
click event is dispatched.  The events run before and after the mouse click 
seem to be the same, so I'm at a loss to understand how the behavior diverges.

Can anybody provide hints about where I should be looking to prevent these 
focus events from screwing up the tests?

Thanks,
-Nathan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to