Bug 518327 - "Allow Pop-ups for ..." menu item not enabled again when leaving Private Browsing mode; r=mconnor

This commit is contained in:
Ehsan Akhgari 2009-12-17 16:11:48 -05:00
parent 08ec536d23
commit 5c7ba61cf3
2 changed files with 11 additions and 5 deletions

View File

@ -440,6 +440,8 @@ const gPopupBlockerObserver = {
if (gPrivateBrowsingUI.privateBrowsingEnabled)
blockedPopupAllowSite.setAttribute("disabled", "true");
else
blockedPopupAllowSite.removeAttribute("disabled", "true");
var item = aEvent.target.lastChild;
while (item && item.getAttribute("observes") != "blockedPopupsSeparator") {

View File

@ -88,10 +88,14 @@ function test() {
gBrowser.selectedTab = tab;
}
pb.privateBrowsingEnabled = true;
testPopupBlockerMenuItem(true, function() {
pb.privateBrowsingEnabled = false;
gPrefService.setBoolPref("dom.disable_open_during_load", oldPopupPolicy);
finish();
testPopupBlockerMenuItem(false, function() {
pb.privateBrowsingEnabled = true;
testPopupBlockerMenuItem(true, function() {
pb.privateBrowsingEnabled = false;
testPopupBlockerMenuItem(false, function() {
gPrefService.setBoolPref("dom.disable_open_during_load", oldPopupPolicy);
finish();
});
});
});
}