diff --git a/browser/components/preferences/tests/browser_permissions.js b/browser/components/preferences/tests/browser_permissions.js index 05ffa8b4e016..f9665aadf0de 100644 --- a/browser/components/preferences/tests/browser_permissions.js +++ b/browser/components/preferences/tests/browser_permissions.js @@ -25,6 +25,11 @@ const TEST_PERMS = { "popup": PERM_DENY }; +const NO_GLOBAL_ALLOW = [ + "geo", + "indexedDB" +]; + // number of managed permissions in the interface const TEST_PERMS_COUNT = 5; @@ -143,6 +148,12 @@ var tests = [ ok(gBrowser.contentDocument.getElementById("cookies-count").hidden, "cookies count is hidden"); + // Test to make sure "Allow" items hidden for certain permission types + NO_GLOBAL_ALLOW.forEach(function(aType) { + let menuitem = gBrowser.contentDocument.getElementById(aType + "-" + PERM_ALLOW); + ok(menuitem.hidden, aType + " allow menuitem hidden for all sites"); + }); + runNextTest(); }, @@ -195,6 +206,12 @@ var tests = [ ok(!gBrowser.contentDocument.getElementById("cookies-count").hidden, "cookies count is not hidden"); + // Test to make sure "Allow" items are *not* hidden for certain permission types + NO_GLOBAL_ALLOW.forEach(function(aType) { + let menuitem = gBrowser.contentDocument.getElementById(aType + "-" + PERM_ALLOW); + ok(!menuitem.hidden, aType + " allow menuitem not hidden for single site"); + }); + runNextTest(); },