зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1170200 - Part 2: Update JavaScript consumers of nsIPermissionManager::Remove; r=ehsan
This commit is contained in:
Родитель
3eb46d5372
Коммит
6265522c59
|
@ -355,11 +355,10 @@ var FullScreen = {
|
|||
"fullscreen",
|
||||
Services.perms.ALLOW_ACTION,
|
||||
Services.perms.EXPIRE_SESSION);
|
||||
let host = uri.host;
|
||||
var onFullscreenchange = function onFullscreenchange(event) {
|
||||
if (event.target == document && document.mozFullScreenElement == null) {
|
||||
// The chrome document has left fullscreen. Remove the temporary permission grant.
|
||||
Services.perms.remove(host, "fullscreen");
|
||||
Services.perms.remove(uri, "fullscreen");
|
||||
document.removeEventListener("mozfullscreenchange", onFullscreenchange);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ let TrackingProtection = {
|
|||
// Remove the current host from the 'trackingprotection' consumer
|
||||
// of the permission manager. This effectively removes this host
|
||||
// from the tracking protection allowlist.
|
||||
Services.perms.remove(gBrowser.selectedBrowser.currentURI.host,
|
||||
Services.perms.remove(gBrowser.selectedBrowser.currentURI,
|
||||
"trackingprotection");
|
||||
|
||||
// Telemetry for enable protection.
|
||||
|
|
|
@ -862,7 +862,7 @@ function onBlockImage()
|
|||
if (checkbox.checked)
|
||||
permissionManager.add(uri, "image", nsIPermissionManager.DENY_ACTION);
|
||||
else
|
||||
permissionManager.remove(uri.host, "image");
|
||||
permissionManager.remove(uri, "image");
|
||||
}
|
||||
|
||||
function onImageSelect()
|
||||
|
|
|
@ -283,7 +283,7 @@ function test_whitelisted_install() {
|
|||
is(aInstalls.length, 1, "Should be one pending install");
|
||||
aInstalls[0].cancel();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -315,7 +315,7 @@ function test_failed_download() {
|
|||
"The add-on could not be downloaded because of a connection failure.",
|
||||
"Should have seen the right message");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -342,7 +342,7 @@ function test_corrupt_file() {
|
|||
"because it appears to be corrupt.",
|
||||
"Should have seen the right message");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -369,7 +369,7 @@ function test_incompatible() {
|
|||
gApp + " " + gVersion + ".",
|
||||
"Should have seen the right message");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -403,7 +403,7 @@ function test_restartless() {
|
|||
AddonManager.getAddonByID("restartless-xpi@tests.mozilla.org", function(aAddon) {
|
||||
aAddon.uninstall();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -444,7 +444,7 @@ function test_multiple() {
|
|||
AddonManager.getAddonByID("restartless-xpi@tests.mozilla.org", function(aAddon) {
|
||||
aAddon.uninstall();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -516,7 +516,7 @@ function test_sequential() {
|
|||
is(container.childNodes.length, 1, "Should be one item listed");
|
||||
is(container.childNodes[0].firstChild.getAttribute("value"), "Theme Test", "Should have the right add-on");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
wait_for_notification_close(() => {
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
runNextTest();
|
||||
|
@ -580,7 +580,7 @@ function test_someunverified() {
|
|||
t.userDisabled = true;
|
||||
t.uninstall();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -628,7 +628,7 @@ function test_allunverified() {
|
|||
AddonManager.getAddonByID("restartless-xpi@tests.mozilla.org", function(aAddon) {
|
||||
aAddon.uninstall();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -795,7 +795,7 @@ function test_reload() {
|
|||
is(aInstalls.length, 1, "Should be one pending install");
|
||||
aInstalls[0].cancel();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -839,7 +839,7 @@ function test_theme() {
|
|||
isnot(aAddon, null, "Test theme will have been installed");
|
||||
aAddon.uninstall();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -918,7 +918,7 @@ function test_renotify_installed() {
|
|||
is(aInstalls.length, 1, "Should be one pending installs");
|
||||
aInstalls[0].cancel();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
wait_for_notification_close(runNextTest);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
@ -986,7 +986,7 @@ function test_cancel() {
|
|||
AddonManager.getAllInstalls(function(aInstalls) {
|
||||
is(aInstalls.length, 0, "Should be no pending install");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
runNextTest();
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@ function test_install_http() {
|
|||
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
|
||||
pm.remove("example.org", "install");
|
||||
pm.remove(makeURI("http://example.org/"), "install");
|
||||
|
||||
runNextTest();
|
||||
});
|
||||
|
@ -66,7 +66,7 @@ function test_install_lwtheme() {
|
|||
LightweightThemeManager.currentTheme = null;
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
|
||||
runNextTest();
|
||||
});
|
||||
|
@ -106,7 +106,7 @@ function test_lwtheme_switch_theme() {
|
|||
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
runNextTest();
|
||||
});
|
||||
|
|
|
@ -567,7 +567,7 @@ let gTests = [
|
|||
is(devicePerms, aExpected ? Perms.ALLOW_ACTION : Perms.DENY_ACTION,
|
||||
aDevice + " persistently " + (aExpected ? "allowed" : "denied"));
|
||||
}
|
||||
Perms.remove(uri.host, aDevice);
|
||||
Perms.remove(uri, aDevice);
|
||||
}
|
||||
checkDevicePermissions("microphone", aExpectedAudioPerm);
|
||||
checkDevicePermissions("camera", aExpectedVideoPerm);
|
||||
|
@ -673,8 +673,8 @@ let gTests = [
|
|||
}
|
||||
}
|
||||
|
||||
Perms.remove(uri.host, "camera");
|
||||
Perms.remove(uri.host, "microphone");
|
||||
Perms.remove(uri, "camera");
|
||||
Perms.remove(uri, "microphone");
|
||||
}
|
||||
|
||||
// Set both permissions identically
|
||||
|
@ -794,8 +794,8 @@ let gTests = [
|
|||
// Cleanup.
|
||||
yield closeStream(true);
|
||||
|
||||
Perms.remove(uri.host, "camera");
|
||||
Perms.remove(uri.host, "microphone");
|
||||
Perms.remove(uri, "camera");
|
||||
Perms.remove(uri, "microphone");
|
||||
}
|
||||
|
||||
info("request audio+video, stop sharing resets both");
|
||||
|
@ -888,8 +888,8 @@ let gTests = [
|
|||
|
||||
// Cleanup.
|
||||
yield closeStream(true);
|
||||
Perms.remove(uri.host, "camera");
|
||||
Perms.remove(uri.host, "microphone");
|
||||
Perms.remove(uri, "camera");
|
||||
Perms.remove(uri, "microphone");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ function test () {
|
|||
|
||||
let pm = Services.perms;
|
||||
registerCleanupFunction(function() {
|
||||
pm.remove(notificationURL, "desktop-notification");
|
||||
pm.remove(makeURI(notificationURL), "desktop-notification");
|
||||
gBrowser.removeTab(tab);
|
||||
window.restore();
|
||||
});
|
||||
|
|
|
@ -44,7 +44,7 @@ add_task(function*() {
|
|||
"remote-troubleshooting",
|
||||
Services.perms.ALLOW_ACTION);
|
||||
registerCleanupFunction(() => {
|
||||
Services.perms.remove(TEST_URI_GOOD.spec, "remote-troubleshooting");
|
||||
Services.perms.remove(TEST_URI_GOOD, "remote-troubleshooting");
|
||||
});
|
||||
|
||||
// Try again - now we are expecting a response with the actual data.
|
||||
|
|
|
@ -177,7 +177,7 @@ function clearAllPermissionsByPrefix(aPrefix) {
|
|||
while (perms.hasMoreElements()) {
|
||||
let perm = perms.getNext();
|
||||
if (perm.type.startsWith(aPrefix)) {
|
||||
Services.perms.remove(perm.host, perm.type);
|
||||
Services.perms.removePermission(perm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ function pageInfoObserve(win, topic, data) {
|
|||
}
|
||||
|
||||
function finishTest() {
|
||||
gPermissionManager.remove("127.0.0.1:8888", gTestPermissionString);
|
||||
gPermissionManager.remove("127.0.0.1:8888", gSecondTestPermissionString);
|
||||
gPermissionManager.remove(makeURI("http://127.0.0.1:8888/"), gTestPermissionString);
|
||||
gPermissionManager.remove(makeURI("http://127.0.0.1:8888/"), gSecondTestPermissionString);
|
||||
Services.prefs.clearUserPref("plugins.click_to_play");
|
||||
gBrowser.removeCurrentTab();
|
||||
|
||||
|
@ -59,8 +59,8 @@ function test() {
|
|||
setTestPluginEnabledState(Ci.nsIPluginTag.STATE_ENABLED, "Second Test Plug-in");
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gTestBrowser = gBrowser.selectedBrowser;
|
||||
gPermissionManager.remove("127.0.0.1:8888", gTestPermissionString);
|
||||
gPermissionManager.remove("127.0.0.1:8888", gSecondTestPermissionString);
|
||||
gPermissionManager.remove(makeURI("http://127.0.0.1:8888/"), gTestPermissionString);
|
||||
gPermissionManager.remove(makeURI("http://127.0.0.1:8888/"), gSecondTestPermissionString);
|
||||
doOnPageLoad(gHttpTestRoot + "plugin_two_types.html", testPart1a);
|
||||
}
|
||||
|
||||
|
@ -141,8 +141,8 @@ function testPart3() {
|
|||
"part 3: Second test plugin should be marked as PLUGIN_DISABLED");
|
||||
|
||||
// reset permissions
|
||||
gPermissionManager.remove("127.0.0.1:8888", gTestPermissionString);
|
||||
gPermissionManager.remove("127.0.0.1:8888", gSecondTestPermissionString);
|
||||
gPermissionManager.remove(makeURI("http://127.0.0.1:8888/"), gTestPermissionString);
|
||||
gPermissionManager.remove(makeURI("http://127.0.0.1:8888/"), gSecondTestPermissionString);
|
||||
// check that changing the permissions affects the radio state in the
|
||||
// open Page Info window
|
||||
let testRadioGroup = gPageInfo.document.getElementById(gTestPermissionString + "RadioGroup");
|
||||
|
|
|
@ -239,7 +239,7 @@ function clearAllPluginPermissions() {
|
|||
let perm = perms.getNext();
|
||||
if (perm.type.startsWith('plugin')) {
|
||||
info("removing permission:" + perm.host + " " + perm.type + "\n");
|
||||
Services.perms.remove(perm.host, perm.type);
|
||||
Services.perms.removePermission(perm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2419,7 +2419,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|||
// Remove the current host from the 'trackingprotection' consumer
|
||||
// of the permission manager. This effectively removes this host
|
||||
// from the tracking protection allowlist.
|
||||
Services.perms.remove(gBrowser.selectedBrowser.currentURI.host,
|
||||
Services.perms.remove(gBrowser.selectedBrowser.currentURI,
|
||||
"trackingprotection");
|
||||
BrowserReload();
|
||||
]]></body>
|
||||
|
|
|
@ -179,7 +179,7 @@ Site.prototype = {
|
|||
* e.g. "cookie", "geo", "indexedDB", "popup", "image"
|
||||
*/
|
||||
clearPermission: function Site_clearPermission(aType) {
|
||||
Services.perms.remove(this.host, aType);
|
||||
Services.perms.remove(this.httpURI, aType);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -458,7 +458,7 @@ var gAdvancedPane = {
|
|||
},
|
||||
|
||||
// XXX: duplicated in browser.js
|
||||
_getOfflineAppUsage: function (host, groups)
|
||||
_getOfflineAppUsage: function (perm, groups)
|
||||
{
|
||||
var cacheService = Components.classes["@mozilla.org/network/application-cache-service;1"].
|
||||
getService(Components.interfaces.nsIApplicationCacheService);
|
||||
|
@ -471,7 +471,7 @@ var gAdvancedPane = {
|
|||
var usage = 0;
|
||||
for (var i = 0; i < groups.length; i++) {
|
||||
var uri = ios.newURI(groups[i], null, null);
|
||||
if (uri.asciiHost == host) {
|
||||
if (uri.asciiHost == perm.host) {
|
||||
var cache = cacheService.getActiveCache(groups[i]);
|
||||
usage += cache.usage;
|
||||
}
|
||||
|
@ -510,7 +510,7 @@ var gAdvancedPane = {
|
|||
row.className = "offlineapp";
|
||||
row.setAttribute("host", perm.host);
|
||||
var converted = DownloadUtils.
|
||||
convertByteUnits(this._getOfflineAppUsage(perm.host, groups));
|
||||
convertByteUnits(this._getOfflineAppUsage(perm, groups));
|
||||
row.setAttribute("usage",
|
||||
bundle.getFormattedString("offlineAppUsage",
|
||||
converted));
|
||||
|
@ -557,7 +557,7 @@ var gAdvancedPane = {
|
|||
getService(Components.interfaces.nsIIOService);
|
||||
var groups = cacheService.getGroups();
|
||||
for (var i = 0; i < groups.length; i++) {
|
||||
var uri = ios.newURI(groups[i], null, null);
|
||||
let uri = ios.newURI(groups[i], null, null);
|
||||
if (uri.asciiHost == host) {
|
||||
var cache = cacheService.getActiveCache(groups[i]);
|
||||
cache.discard();
|
||||
|
@ -567,10 +567,15 @@ var gAdvancedPane = {
|
|||
// remove the permission
|
||||
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
||||
.getService(Components.interfaces.nsIPermissionManager);
|
||||
pm.remove(host, "offline-app",
|
||||
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
|
||||
pm.remove(host, "offline-app",
|
||||
Components.interfaces.nsIOfflineCacheUpdateService.ALLOW_NO_WARN);
|
||||
let uri;
|
||||
try {
|
||||
// file:// URIs are stored with their scheme. We try to parse them first, as
|
||||
// URIs like http://file:///foo/bar/baz.html will parse as HTTP URIs.
|
||||
uri = ios.newURI(host, null, null);
|
||||
} catch (e) {
|
||||
uri = ios.newURI("http://" + host, null, null);
|
||||
}
|
||||
pm.remove(uri, "offline-app");
|
||||
|
||||
list.removeChild(item);
|
||||
gAdvancedPane.offlineAppSelected();
|
||||
|
|
|
@ -492,7 +492,7 @@ var gAdvancedPane = {
|
|||
},
|
||||
|
||||
// XXX: duplicated in browser.js
|
||||
_getOfflineAppUsage: function (host, groups)
|
||||
_getOfflineAppUsage: function (perm, groups)
|
||||
{
|
||||
var cacheService = Components.classes["@mozilla.org/network/application-cache-service;1"].
|
||||
getService(Components.interfaces.nsIApplicationCacheService);
|
||||
|
@ -502,7 +502,7 @@ var gAdvancedPane = {
|
|||
var usage = 0;
|
||||
for (var i = 0; i < groups.length; i++) {
|
||||
var uri = ios.newURI(groups[i], null, null);
|
||||
if (uri.asciiHost == host) {
|
||||
if (uri.asciiHost == perm.host) {
|
||||
var cache = cacheService.getActiveCache(groups[i]);
|
||||
usage += cache.usage;
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ var gAdvancedPane = {
|
|||
row.className = "offlineapp";
|
||||
row.setAttribute("host", perm.host);
|
||||
var converted = DownloadUtils.
|
||||
convertByteUnits(this._getOfflineAppUsage(perm.host, groups));
|
||||
convertByteUnits(this._getOfflineAppUsage(perm, groups));
|
||||
row.setAttribute("usage",
|
||||
bundle.getFormattedString("offlineAppUsage",
|
||||
converted));
|
||||
|
@ -594,7 +594,7 @@ var gAdvancedPane = {
|
|||
getService(Components.interfaces.nsIIOService);
|
||||
var groups = cacheService.getGroups();
|
||||
for (var i = 0; i < groups.length; i++) {
|
||||
var uri = ios.newURI(groups[i], null, null);
|
||||
let uri = ios.newURI(groups[i], null, null);
|
||||
if (uri.asciiHost == host) {
|
||||
var cache = cacheService.getActiveCache(groups[i]);
|
||||
cache.discard();
|
||||
|
@ -605,10 +605,15 @@ var gAdvancedPane = {
|
|||
// remove the permission
|
||||
var pm = Components.classes["@mozilla.org/permissionmanager;1"]
|
||||
.getService(Components.interfaces.nsIPermissionManager);
|
||||
pm.remove(host, "offline-app",
|
||||
Components.interfaces.nsIPermissionManager.ALLOW_ACTION);
|
||||
pm.remove(host, "offline-app",
|
||||
Components.interfaces.nsIOfflineCacheUpdateService.ALLOW_NO_WARN);
|
||||
let uri;
|
||||
try {
|
||||
// file:// URIs are stored with their scheme. We try to parse them first, as
|
||||
// URIs like http://file:///foo/bar/baz.html will parse as HTTP URIs.
|
||||
uri = ios.newURI(host, null, null);
|
||||
} catch (e) {
|
||||
uri = ios.newURI("http://" + host, null, null);
|
||||
}
|
||||
pm.remove(uri, "offline-app");
|
||||
|
||||
list.removeChild(item);
|
||||
gAdvancedPane.offlineAppSelected();
|
||||
|
|
|
@ -368,7 +368,8 @@ var gPermissionManager = {
|
|||
}
|
||||
|
||||
for (let p of this._permissionsToDelete.values()) {
|
||||
Services.perms.remove(p.host, p.type);
|
||||
let uri = Services.io.newURI("http://" + p.host, null, null);
|
||||
Services.perms.remove(uri, p.type);
|
||||
}
|
||||
|
||||
window.close();
|
||||
|
|
|
@ -54,9 +54,9 @@ function setup(aCallback) {
|
|||
function cleanUp() {
|
||||
for (let type in TEST_PERMS) {
|
||||
if (type != "password") {
|
||||
Services.perms.remove(TEST_URI_1.host, type);
|
||||
Services.perms.remove(TEST_URI_2.host, type);
|
||||
Services.perms.remove(TEST_URI_3.host, type);
|
||||
Services.perms.remove(TEST_URI_1, type);
|
||||
Services.perms.remove(TEST_URI_2, type);
|
||||
Services.perms.remove(TEST_URI_3, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,8 @@ var testRunner = {
|
|||
observances: [{ type: "popup", host: "test.com", data: "added",
|
||||
capability: Ci.nsIPermissionManager.DENY_ACTION }],
|
||||
cleanUp: function(params) {
|
||||
params.pm.remove("test.com", "popup");
|
||||
let uri = params.ioService.newURI("http://test.com", null, null);
|
||||
params.pm.remove(uri, "popup");
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
@ -188,8 +188,10 @@ let gTranslationExceptions = {
|
|||
|
||||
onSiteDeleted: function() {
|
||||
let removedSites = this._siteTree.getSelectedItems();
|
||||
for (let host of removedSites)
|
||||
Services.perms.remove(host, kPermissionType);
|
||||
for (let host of removedSites) {
|
||||
let uri = Services.io.newURI("http://" + host, null, null);
|
||||
Services.perms.remove(uri, kPermissionType);
|
||||
}
|
||||
},
|
||||
|
||||
onAllSitesDeleted: function() {
|
||||
|
@ -199,8 +201,10 @@ let gTranslationExceptions = {
|
|||
let removedSites = this._sites.splice(0, this._sites.length);
|
||||
this._siteTree.boxObject.rowCountChanged(0, -removedSites.length);
|
||||
|
||||
for (let host of removedSites)
|
||||
Services.perms.remove(host, kPermissionType);
|
||||
for (let host of removedSites) {
|
||||
let uri = Services.io.newURI("http://" + host, null, null);
|
||||
Services.perms.remove(uri, kPermissionType);
|
||||
}
|
||||
|
||||
this.onSiteSelected();
|
||||
},
|
||||
|
|
|
@ -194,7 +194,7 @@ let gTests = [
|
|||
"The 'Never translate French' item is disabled");
|
||||
|
||||
// Cleanup.
|
||||
Services.perms.remove("example.com", "translate");
|
||||
Services.perms.remove(makeURI("http://example.com"), "translate");
|
||||
notif.close();
|
||||
}
|
||||
},
|
||||
|
@ -287,8 +287,8 @@ let gTests = [
|
|||
is(getDomainExceptions().length, 1, "One exception in the permissions");
|
||||
|
||||
// Clear the permissions, and check the last item is removed from the display.
|
||||
perms.remove("example.org", "translate");
|
||||
perms.remove("example.com", "translate");
|
||||
perms.remove(makeURI("http://example.org"), "translate");
|
||||
perms.remove(makeURI("http://example.com"), "translate");
|
||||
is(tree.view.rowCount, 0, "The site exceptions list is empty");
|
||||
ok(remove.disabled, "The 'Remove Site' button is disabled");
|
||||
ok(removeAll.disabled, "The 'Remove All Site' button is disabled");
|
||||
|
|
|
@ -212,7 +212,7 @@ function UITourTest() {
|
|||
gBrowser.removeTab(gTestTab);
|
||||
delete window.gTestTab;
|
||||
Services.prefs.clearUserPref("browser.uitour.enabled", true);
|
||||
Services.perms.remove("example.com", "uitour");
|
||||
Services.perms.remove(testUri, "uitour");
|
||||
});
|
||||
|
||||
function done() {
|
||||
|
|
|
@ -93,7 +93,7 @@ this.SitePermissions = {
|
|||
if (!this.isSupportedURI(aURI))
|
||||
return;
|
||||
|
||||
Services.perms.remove(aURI.host, aPermissionID);
|
||||
Services.perms.remove(aURI, aPermissionID);
|
||||
},
|
||||
|
||||
/* Returns the localized label for the permission with the given ID, to be
|
||||
|
|
|
@ -112,7 +112,7 @@ add_task(function* setupEnvironment() {
|
|||
Services.perms.add(pageURI, "uitour", Services.perms.ALLOW_ACTION);
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
Services.perms.remove("example.com", "uitour");
|
||||
Services.perms.remove(pageURI, "uitour");
|
||||
Preferences.set(PREF_SELFSUPPORT_ENABLED, selfSupportEnabled);
|
||||
Preferences.set(PREF_UITOUR_ENABLED, uitourEnabled);
|
||||
Preferences.set(PREF_SELFSUPPORT_URL, selfSupportURL);
|
||||
|
|
|
@ -749,14 +749,13 @@ function updateBrowserSpecificIndicator(aBrowser, aState) {
|
|||
accessKey: stringBundle.getString("getUserMedia.stopSharing.accesskey"),
|
||||
callback: function () {
|
||||
let uri = Services.io.newURI(aState.documentURI, null, null);
|
||||
let host = getHost(uri);
|
||||
let perms = Services.perms;
|
||||
if (aState.camera &&
|
||||
perms.testExactPermission(uri, "camera") == perms.ALLOW_ACTION)
|
||||
perms.remove(host, "camera");
|
||||
perms.remove(uri, "camera");
|
||||
if (aState.microphone &&
|
||||
perms.testExactPermission(uri, "microphone") == perms.ALLOW_ACTION)
|
||||
perms.remove(host, "microphone");
|
||||
perms.remove(uri, "microphone");
|
||||
|
||||
let mm = notification.browser.messageManager;
|
||||
mm.sendAsyncMessage("webrtc:StopSharing", windowId);
|
||||
|
|
|
@ -16,14 +16,14 @@ function run_test() {
|
|||
do_check_true(permission_exists(kTestAddr, kType, kCapability));
|
||||
|
||||
// remove the permission, and make sure it was removed
|
||||
Services.perms.remove(kTestAddr, kType);
|
||||
Services.perms.remove(uri, kType);
|
||||
do_check_false(permission_exists(kTestAddr, kType, kCapability));
|
||||
|
||||
uri = Services.io.newURI("mailto:" + kTestAddr, null, null);
|
||||
Services.perms.add(uri, kType, kCapability);
|
||||
do_check_true(permission_exists(kTestAddr, kType, kCapability));
|
||||
|
||||
Services.perms.remove(kTestAddr, kType);
|
||||
Services.perms.remove(uri, kType);
|
||||
do_check_false(permission_exists(kTestAddr, kType, kCapability));
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ var PermissionsHelper = {
|
|||
// Re-set login saving to enabled
|
||||
Services.logins.setLoginSavingEnabled(aURI.prePath, true);
|
||||
} else {
|
||||
Services.perms.remove(aURI.host, aType);
|
||||
Services.perms.remove(aURI, aType);
|
||||
// Clear content prefs set in ContentPermissionPrompt.js
|
||||
Cc["@mozilla.org/content-pref/service;1"]
|
||||
.getService(Ci.nsIContentPrefService2)
|
||||
|
|
|
@ -1769,7 +1769,7 @@ var BrowserApp = {
|
|||
// Remove the current host from the 'trackingprotection' consumer
|
||||
// of the permission manager. This effectively removes this host
|
||||
// from the tracking protection white list (any list actually).
|
||||
Services.perms.remove(browser.currentURI.host, "trackingprotection");
|
||||
Services.perms.remove(browser.currentURI, "trackingprotection");
|
||||
Telemetry.addData("TRACKING_PROTECTION_EVENTS", 2);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ this.ForgetAboutSite = {
|
|||
while (enumerator.hasMoreElements()) {
|
||||
let perm = enumerator.getNext().QueryInterface(Ci.nsIPermission);
|
||||
if (hasRootDomain(perm.host, aDomain))
|
||||
pm.remove(perm.host, perm.type);
|
||||
pm.removePermission(perm);
|
||||
}
|
||||
|
||||
// Offline Storages
|
||||
|
|
|
@ -85,7 +85,7 @@ add_task(function test_web_channel_listen_permission() {
|
|||
return new Promise((resolve, reject) => {
|
||||
// add a new permission
|
||||
Services.perms.add(VALID_WEB_CHANNEL_ORIGIN, TEST_PERMISSION_NAME, Services.perms.ALLOW_ACTION);
|
||||
do_register_cleanup(() => Services.perms.remove(VALID_WEB_CHANNEL_ORIGIN.spec, TEST_PERMISSION_NAME));
|
||||
do_register_cleanup(() => Services.perms.remove(VALID_WEB_CHANNEL_ORIGIN, TEST_PERMISSION_NAME));
|
||||
let channel = new WebChannel(VALID_WEB_CHANNEL_ID, TEST_PERMISSION_NAME, {
|
||||
broker: MockWebChannelBroker
|
||||
});
|
||||
|
|
|
@ -40,7 +40,7 @@ function finish_test(count) {
|
|||
.getService(Components.interfaces.nsIHttpAuthManager);
|
||||
authMgr.clearAll();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -39,7 +39,7 @@ function finish_test(count) {
|
|||
.getService(Components.interfaces.nsIHttpAuthManager);
|
||||
authMgr.clearAll();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -47,7 +47,7 @@ function finish_test(count) {
|
|||
.getService(Components.interfaces.nsIHttpAuthManager);
|
||||
authMgr.clearAll();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -46,7 +46,7 @@ function finish_test(count) {
|
|||
.getService(Components.interfaces.nsIHttpAuthManager);
|
||||
authMgr.clearAll();
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeTab(gNewTab);
|
||||
Harness.finish();
|
||||
|
|
|
@ -26,7 +26,7 @@ function download_failed(install) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -26,7 +26,7 @@ function download_failed(install) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com/"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -18,7 +18,7 @@ function check_xpi_install(install, addon) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -28,7 +28,7 @@ function confirm_install(window) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "0 Add-ons should have been successfully installed");
|
||||
Services.perms.remove("addons.mozilla.org", "install");
|
||||
Services.perms.remove(makeURI("http://addons.mozilla.org"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -46,7 +46,7 @@ function finish_test(count) {
|
|||
|
||||
Services.ww = gWindowWatcher;
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
Harness.finish();
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -81,8 +81,8 @@ function test() {
|
|||
Services.prefs.clearUserPref(PREF_LOGGING_ENABLED);
|
||||
Services.prefs.clearUserPref(PREF_INSTALL_REQUIRESECUREORIGIN);
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove("example.org", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
Services.perms.remove(makeURI("http://example.org"), "install");
|
||||
|
||||
while (gConcurrentTabs.length) {
|
||||
gBrowser.removeTab(gConcurrentTabs.shift());
|
||||
|
|
|
@ -23,7 +23,7 @@ function download_failed(install) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -33,7 +33,7 @@ function finish_test(count) {
|
|||
.getService(Components.interfaces.nsICookieManager2);
|
||||
cm.remove("example.com", "xpinstall", "/browser/" + RELATIVE_DIR, false);
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -37,7 +37,7 @@ function finish_test(count) {
|
|||
|
||||
Services.prefs.clearUserPref("network.cookie.cookieBehavior");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -36,7 +36,7 @@ function finish_test(count) {
|
|||
cm.remove("example.org", "xpinstall", "/browser/" + RELATIVE_DIR, false);
|
||||
|
||||
Services.prefs.clearUserPref("network.cookie.cookieBehavior");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -22,7 +22,7 @@ function download_failed(install) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
var doc = gBrowser.contentDocument;
|
||||
is(doc.getElementById("status").textContent, "-207", "Callback should have seen the failure");
|
||||
|
|
|
@ -21,7 +21,7 @@ function download_failed(install) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -27,7 +27,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -27,7 +27,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -31,7 +31,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS);
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
|
@ -31,7 +31,7 @@ function download_failed(install) {
|
|||
function finish_test(count) {
|
||||
is(count, 0, "0 Add-ons should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS);
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
|
@ -31,7 +31,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS);
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
|
@ -29,7 +29,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -32,7 +32,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS);
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
|
@ -75,7 +75,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
Services.prefs.clearUserPref(PREF_INSTALL_REQUIREBUILTINCERTS);
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
|
@ -18,7 +18,7 @@ function install_ended(install, addon) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -29,7 +29,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -29,7 +29,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
Harness.finish();
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ function finish_test(count) {
|
|||
} catch (ex) {
|
||||
}
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
wait_for_online();
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
var doc = gBrowser.contentDocument;
|
||||
is(doc.getElementById("return").textContent, "true", "installTrigger should have claimed success");
|
||||
|
|
|
@ -65,7 +65,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 5, "5 Add-ons should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -60,7 +60,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 3, "3 Add-ons should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -26,7 +26,7 @@ function download_failed(install) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -34,7 +34,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -33,7 +33,7 @@ function install_ended(install, addon) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -18,7 +18,7 @@ function install_ended(install, addon) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -42,7 +42,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeTab(expectedTab);
|
||||
Harness.finish();
|
||||
|
|
|
@ -31,7 +31,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
var doc = gBrowser.contentDocument;
|
||||
is(gBrowser.currentURI.spec, TESTROOT + "triggerredirect.html#foo", "Should have redirected");
|
||||
|
|
|
@ -39,7 +39,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
var doc = gBrowser.contentDocument;
|
||||
is(doc.getElementById("return").textContent, "true", "installTrigger should have claimed success");
|
||||
|
|
|
@ -40,7 +40,7 @@ function install_ended(install, addon) {
|
|||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
var doc = gBrowser.contentWindow.frames[0].document; // Document of iframe
|
||||
is(doc.getElementById("return").textContent, "true", "installTrigger in iframe should have claimed success");
|
||||
|
|
|
@ -24,7 +24,7 @@ function allow_blocked(installInfo) {
|
|||
}
|
||||
|
||||
function finish_test() {
|
||||
Services.perms.remove("example.org", "install");
|
||||
Services.perms.remove(makeURI("http://example.org"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -22,7 +22,7 @@ function confirm_install(window) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
Services.perms.remove("example.org", "install");
|
||||
Services.perms.remove(makeURI("http://example.org"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -24,7 +24,7 @@ function allow_blocked(installInfo) {
|
|||
|
||||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
Services.perms.remove("example.com", "install");
|
||||
Services.perms.remove(makeURI("http://example.com"), "install");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
|
|
|
@ -22,7 +22,7 @@ function allow_blocked(installInfo) {
|
|||
function finish_test(count) {
|
||||
is(count, 0, "No add-ons should have been installed");
|
||||
|
||||
Services.perms.remove("example.org", "install");
|
||||
Services.perms.remove(makeURI("http://example.org"), "install");
|
||||
Services.prefs.clearUserPref("xpinstall.whitelist.directRequest");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
|
|
Загрузка…
Ссылка в новой задаче