Firefox 16.0a1 (2012-07-03) Device: Galaxy Nexus OS: Android 4.0.2 Steps to reproduce: 1. Open Fennec 2. Browse to popuptest.com/popuptest1.html 3. Dismiss the doorhanger by tapping on "Always Show" button 4. Refresh the page opened at step 2 5. After all popups are loaded, switch to the tab from step 2 6. Repeat steps 4-5 until there will be at least 30+ tabs opened Expected result: Doorhanger is never displayed again. Actual result: Doorhanger is displayed again after opening 27+ tabs.
Weird, this happens on desktop as well. It seems like it's an issue with the DOMPopupBlocked event. I added some logging, and I found that after about 25 popups are opened we start blocking them again. Maybe this is a security measure? I'm not sure exactly where popup blocker bugs should go, but I'm moving this over to Core->DOM.
The cap on the total number of popups that can be open at once is controlled by the "dom.popup_maximum" preference. This applies to popups in the "abused" or "controlled" states. The popup whitelist lowers the popup state by one. So openControlled will be lowered to openAllowed and openAbused will be lowered to openControlled. In this case, the popups normally have openAbused as the state and the whitelist is lowering them to controlled, which is still subject to the global cap. Looks to me like everything is working as designed at first glance....
I suppose one could make the argument that the whitelist should send popups to openAllowed instead of just down one notch. I'm pretty sure it was done this way on purpose, though.