Created attachment 575110 [details] [diff] [review] Patch I have no idea for writing tests of tooltip...
Created attachment 576859 [details] [diff] [review] Patch
Comment on attachment 576859 [details] [diff] [review] Patch The test could be a chrome test using event listener popupshowing or some such event.
>- evtTarget = do_QueryInterface(doc); >- evtTarget->AddEventListener(NS_LITERAL_STRING("DOMMouseScroll"), >+ // Probably, we should listen to untrusted events for hiding tooltips >+ // on content since tooltips might disturb something of web >+ // applications. If we don't specify the aWantsUntrusted of >+ // AddSystemEventListener(), the event taget set it to TRUE if the >+ // target is in content. Not sure about this, but 'taget' should be 'target'.
Hmm, I cannot make the new test. Looks like that tooltip's showing event is fired on the XUL document which has the showing tooltip. I don't know if this is an intentional behavior. I think, at least for tests, we should be able to know the tooltip state from tests. I'll file a bug for it. https://hg.mozilla.org/integration/mozilla-inbound/rev/b2a4048facc0
Created attachment 577897 [details] [diff] [review] test Okay, I succeeded to write the test.
Comment on attachment 577897 [details] [diff] [review] test Make sure to push this to try before landing.