Bug 1216271 - Follow-up to add L10N notes and fix style to use an early return. r=me

--HG--
extra : commitid : 4zmXYvp642p
This commit is contained in:
Matthew Noorenberghe 2015-11-01 17:11:23 -08:00
parent 3b20ee2cf4
commit eaebce9463
2 changed files with 10 additions and 5 deletions

View File

@ -6,10 +6,11 @@ function promiseAlertWindow() {
alertWindow.addEventListener("load", function onLoad() {
alertWindow.removeEventListener("load", onLoad);
let windowType = alertWindow.document.documentElement.getAttribute("windowtype");
if (windowType == "alert:alert") {
Services.wm.removeListener(listener);
resolve(alertWindow);
if (windowType != "alert:alert") {
return;
}
Services.wm.removeListener(listener);
resolve(alertWindow);
});
},
};
@ -17,8 +18,10 @@ function promiseAlertWindow() {
});
}
// `promiseWindowClosed` is similar to `BrowserTestUtils.closeWindow`, but
// doesn't call `window.close()`.
/**
* Similar to `BrowserTestUtils.closeWindow`, but
* doesn't call `window.close()`.
*/
function promiseWindowClosed(window) {
return new Promise(function(resolve) {
Services.ww.registerNotification(function observer(subject, topic, data) {

View File

@ -382,7 +382,9 @@ webNotifications.alwaysReceive.accesskey=A
webNotifications.neverShow=Always Block Notifications
webNotifications.neverShow.accesskey=N
webNotifications.receiveFromSite=Would you like to receive notifications from this site?
# LOCALIZATION NOTE (webNotifications.upgradeTitle): When using native notifications on OS X, the title may be truncated around 32 characters.
webNotifications.upgradeTitle=Upgraded notifications
# LOCALIZATION NOTE (webNotifications.upgradeInfo): When using native notifications on OS X, the body may be truncated around 100 characters in some views.
webNotifications.upgradeInfo=You will receive notifications from sites, even those not open in a tab. Click to learn more.
# Pointer lock UI