mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1211718 - Remove address field from notification permissions dialog. r=MattN
This commit is contained in:
parent
0c6d296682
commit
49992b316c
@ -121,13 +121,9 @@ var gContentPane = {
|
||||
showNotificationExceptions()
|
||||
{
|
||||
let bundlePreferences = document.getElementById("bundlePreferences");
|
||||
let params = { blockVisible: true,
|
||||
sessionVisible: false,
|
||||
allowVisible: true,
|
||||
prefilledHost: "",
|
||||
permissionType: "desktop-notification" };
|
||||
let params = { permissionType: "desktop-notification" };
|
||||
params.windowTitle = bundlePreferences.getString("notificationspermissionstitle");
|
||||
params.introText = bundlePreferences.getString("notificationspermissionstext");
|
||||
params.introText = bundlePreferences.getString("notificationspermissionstext2");
|
||||
|
||||
gSubDialog.open("chrome://browser/content/preferences/permissions.xul",
|
||||
"resizable=yes", params);
|
||||
|
@ -22,6 +22,7 @@ skip-if = os != "win" # This test tests the windows-specific app selection dialo
|
||||
skip-if = !healthreport || (os == 'linux' && debug)
|
||||
[browser_notifications_do_not_disturb.js]
|
||||
[browser_permissions.js]
|
||||
[browser_permissions_urlFieldHidden.js]
|
||||
[browser_proxy_backup.js]
|
||||
[browser_privacypane_1.js]
|
||||
[browser_privacypane_3.js]
|
||||
|
@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
const PERMISSIONS_URL = "chrome://browser/content/preferences/permissions.xul";
|
||||
|
||||
add_task(function* urlFieldVisibleForPopupPermissions(finish) {
|
||||
yield openPreferencesViaOpenPreferencesAPI("paneContent", null, {leaveOpen: true});
|
||||
let win = gBrowser.selectedBrowser.contentWindow;
|
||||
let doc = win.document;
|
||||
let popupPolicyCheckbox = doc.getElementById("popupPolicy");
|
||||
ok(!popupPolicyCheckbox.checked, "popupPolicyCheckbox should be unchecked by default");
|
||||
popupPolicyCheckbox.click();
|
||||
let popupPolicyButton = doc.getElementById("popupPolicyButton");
|
||||
ok(popupPolicyButton, "popupPolicyButton found");
|
||||
let dialogPromise = promiseLoadSubDialog(PERMISSIONS_URL);
|
||||
popupPolicyButton.click();
|
||||
let dialog = yield dialogPromise;
|
||||
ok(dialog, "dialog loaded");
|
||||
|
||||
let urlLabel = dialog.document.getElementById("urlLabel");
|
||||
ok(!urlLabel.hidden, "urlLabel should be visible when one of block/session/allow visible");
|
||||
let url = dialog.document.getElementById("url");
|
||||
ok(!url.hidden, "url should be visible when one of block/session/allow visible");
|
||||
|
||||
popupPolicyCheckbox.click();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
||||
add_task(function* urlFieldHiddenForNotificationPermissions() {
|
||||
yield openPreferencesViaOpenPreferencesAPI("paneContent", null, {leaveOpen: true});
|
||||
let win = gBrowser.selectedBrowser.contentWindow;
|
||||
let doc = win.document;
|
||||
let notificationsPolicyButton = doc.getElementById("notificationsPolicyButton");
|
||||
ok(notificationsPolicyButton, "notificationsPolicyButton found");
|
||||
let dialogPromise = promiseLoadSubDialog(PERMISSIONS_URL);
|
||||
notificationsPolicyButton.click();
|
||||
let dialog = yield dialogPromise;
|
||||
ok(dialog, "dialog loaded");
|
||||
|
||||
let urlLabel = dialog.document.getElementById("urlLabel");
|
||||
ok(urlLabel.hidden, "urlLabel should be hidden as requested");
|
||||
let url = dialog.document.getElementById("url");
|
||||
ok(url.hidden, "url should be hidden as requested");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
@ -25,7 +25,7 @@ addonspermissionstext=You can specify which websites are allowed to install add-
|
||||
addons_permissions_title=Allowed Sites - Add-ons Installation
|
||||
popuppermissionstext=You can specify which websites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
|
||||
popuppermissionstitle=Allowed Sites - Pop-ups
|
||||
notificationspermissionstext=You can specify which websites are always or never allowed to show notifications. Type the exact address of the site you want to manage and then click Block or Allow.
|
||||
notificationspermissionstext2=Control which websites are always or never allowed to show notifications. If you remove a site, it will need to request permission again.
|
||||
notificationspermissionstitle=Notification Permissions
|
||||
invalidURI=Please enter a valid hostname
|
||||
invalidURITitle=Invalid Hostname Entered
|
||||
|
Loading…
Reference in New Issue
Block a user