Bug 1934349 - Port bug 1857834: Upgrade to Prettier v3. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D230723 --HG-- extra : amend_source : 2b9a5969815bacc0ffc68a0bafe4d623fd957c99
This commit is contained in:
Родитель
0b010de276
Коммит
ea3eca1fa6
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, you can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
M: "event-duration-menuitem-minutes",
|
||||
H: "event-duration-menuitem-hours",
|
||||
D: "event-duration-menuitem-days",
|
||||
}[unit] || "event-duration-menuitem-minutes");
|
||||
})[unit] || "event-duration-menuitem-minutes";
|
||||
|
||||
for (const menuItem of menu.getElementsByTagName("menuitem")) {
|
||||
document.l10n.setAttributes(menuItem, getUnitEntry(menuItem.value), {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, you can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
|
|
@ -1784,9 +1784,8 @@ MatrixAccount.prototype = {
|
|||
this.prefs.getIntPref("port", 443)
|
||||
);
|
||||
}
|
||||
let discoveredInfo = await lazy.MatrixSDK.AutoDiscovery.findClientConfig(
|
||||
domain
|
||||
);
|
||||
let discoveredInfo =
|
||||
await lazy.MatrixSDK.AutoDiscovery.findClientConfig(domain);
|
||||
let homeserverResult = discoveredInfo[HOMESERVER_WELL_KNOWN];
|
||||
|
||||
// If the well-known lookup fails, pretend the domain has a well-known for
|
||||
|
|
|
@ -2136,9 +2136,8 @@ var gAccountSetup = {
|
|||
}
|
||||
|
||||
gAccountSetupLogger.debug("creating account in backend");
|
||||
const newAccount = await CreateInBackend.createAccountInBackend(
|
||||
configFilledIn
|
||||
);
|
||||
const newAccount =
|
||||
await CreateInBackend.createAccountInBackend(configFilledIn);
|
||||
|
||||
window.close();
|
||||
gMainWindow.postMessage("account-created-in-backend", "*");
|
||||
|
@ -2465,9 +2464,8 @@ var gAccountSetup = {
|
|||
*/
|
||||
async finish(concreteConfig) {
|
||||
gAccountSetupLogger.debug("creating account in backend");
|
||||
const newAccount = await CreateInBackend.createAccountInBackend(
|
||||
concreteConfig
|
||||
);
|
||||
const newAccount =
|
||||
await CreateInBackend.createAccountInBackend(concreteConfig);
|
||||
|
||||
// Trigger the first login to download the folder structure and messages.
|
||||
newAccount.incomingServer.getNewMessages(
|
||||
|
|
|
@ -102,9 +102,8 @@ class AccountHubHeader extends HTMLElement {
|
|||
);
|
||||
|
||||
if (description || fluentDescriptionId || error?.message) {
|
||||
this.shadowRoot.querySelector(
|
||||
"#emailFormNotificationToggle"
|
||||
).hidden = false;
|
||||
this.shadowRoot.querySelector("#emailFormNotificationToggle").hidden =
|
||||
false;
|
||||
} else {
|
||||
this.#notificationForm.setAttribute("aria-disabled", true);
|
||||
}
|
||||
|
|
|
@ -879,9 +879,8 @@ class AccountHubEmail extends HTMLElement {
|
|||
}
|
||||
|
||||
gAccountSetupLogger.debug("Creating account in backend.");
|
||||
const newAccount = await CreateInBackend.createAccountInBackend(
|
||||
accountConfig
|
||||
);
|
||||
const newAccount =
|
||||
await CreateInBackend.createAccountInBackend(accountConfig);
|
||||
|
||||
this.#moveToAccountManager(newAccount.incomingServer);
|
||||
}
|
||||
|
@ -1017,9 +1016,8 @@ class AccountHubEmail extends HTMLElement {
|
|||
*/
|
||||
async #finishEmailAccountAddition(completeConfig) {
|
||||
gAccountSetupLogger.debug("Creating account in backend.");
|
||||
const emailAccount = await CreateInBackend.createAccountInBackend(
|
||||
completeConfig
|
||||
);
|
||||
const emailAccount =
|
||||
await CreateInBackend.createAccountInBackend(completeConfig);
|
||||
emailAccount.incomingServer.getNewMessages(
|
||||
emailAccount.incomingServer.rootFolder,
|
||||
window.msgWindow,
|
||||
|
|
|
@ -23,9 +23,8 @@ ChromeUtils.defineLazyGetter(this, "ABQueryUtils", function () {
|
|||
return ChromeUtils.importESModule("resource:///modules/ABQueryUtils.sys.mjs");
|
||||
});
|
||||
ChromeUtils.defineLazyGetter(this, "ICAL", function () {
|
||||
return ChromeUtils.importESModule(
|
||||
"resource:///modules/calendar/Ical.sys.mjs"
|
||||
).default;
|
||||
return ChromeUtils.importESModule("resource:///modules/calendar/Ical.sys.mjs")
|
||||
.default;
|
||||
});
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
|
@ -3691,9 +3690,8 @@ var detailsPane = {
|
|||
const listDirectory = MailServices.ab.getDirectory(listCard.mailListURI);
|
||||
|
||||
document.querySelector("#viewContact .list-header").hidden = false;
|
||||
document.querySelector(
|
||||
"#viewContact .list-header > h1"
|
||||
).textContent = `${listDirectory.dirName}`;
|
||||
document.querySelector("#viewContact .list-header > h1").textContent =
|
||||
`${listDirectory.dirName}`;
|
||||
|
||||
const cards = Array.from(listDirectory.childCards, card => {
|
||||
return {
|
||||
|
|
|
@ -11058,9 +11058,8 @@ function InitEditor() {
|
|||
);
|
||||
if (gMsgCompose.composeHTML) {
|
||||
// Re-enable table/image resizers.
|
||||
editor.QueryInterface(
|
||||
Ci.nsIHTMLAbsPosEditor
|
||||
).absolutePositioningEnabled = true;
|
||||
editor.QueryInterface(Ci.nsIHTMLAbsPosEditor).absolutePositioningEnabled =
|
||||
true;
|
||||
editor.QueryInterface(
|
||||
Ci.nsIHTMLInlineTableEditor
|
||||
).inlineTableEditingEnabled = true;
|
||||
|
|
|
@ -71,9 +71,8 @@ add_task(async function test_background_app_update_policy() {
|
|||
set: [["app.update.background.scheduling.enabled", true]],
|
||||
});
|
||||
|
||||
const origBackgroundUpdateVal = await UpdateUtils.readUpdateConfigSetting(
|
||||
PREF_NAME
|
||||
);
|
||||
const origBackgroundUpdateVal =
|
||||
await UpdateUtils.readUpdateConfigSetting(PREF_NAME);
|
||||
registerCleanupFunction(async () => {
|
||||
await UpdateUtils.writeUpdateConfigSetting(
|
||||
PREF_NAME,
|
||||
|
|
|
@ -53,9 +53,8 @@ async function test_cookie_settings({
|
|||
uri: firstPartyURI,
|
||||
loadUsingSystemPrincipal: true,
|
||||
});
|
||||
channel.QueryInterface(
|
||||
Ci.nsIHttpChannelInternal
|
||||
).forceAllowThirdPartyCookie = true;
|
||||
channel.QueryInterface(Ci.nsIHttpChannelInternal).forceAllowThirdPartyCookie =
|
||||
true;
|
||||
Services.cookies.removeAll();
|
||||
Services.cookies.setCookieStringFromHttp(firstPartyURI, "key=value", channel);
|
||||
Services.cookies.setCookieStringFromHttp(thirdPartyURI, "key=value", channel);
|
||||
|
|
|
@ -946,9 +946,8 @@ this.messages = class extends ExtensionAPIPersistent {
|
|||
for (const partName of partNames) {
|
||||
let attachmentPart;
|
||||
try {
|
||||
attachmentPart = await msgHdrProcessor.getAttachmentPart(
|
||||
partName
|
||||
);
|
||||
attachmentPart =
|
||||
await msgHdrProcessor.getAttachmentPart(partName);
|
||||
} catch (ex) {
|
||||
switch (ex.cause) {
|
||||
case "MessageDecryptionError":
|
||||
|
|
|
@ -78,9 +78,8 @@ const subtest_clickOpenInBrowserContextMenu = async (extension, getBrowser) => {
|
|||
|
||||
// Wait for click on #description
|
||||
{
|
||||
const { elementSelector, url } = await extension.awaitMessage(
|
||||
"contextClick"
|
||||
);
|
||||
const { elementSelector, url } =
|
||||
await extension.awaitMessage("contextClick");
|
||||
Assert.equal(
|
||||
"#description",
|
||||
elementSelector,
|
||||
|
|
|
@ -718,18 +718,15 @@ add_task(async function test_compose_attachments() {
|
|||
// Convert the second attachment to a cloudFile attachment.
|
||||
|
||||
await new Promise(resolve => {
|
||||
browser.cloudFile.onFileUpload.addListener(function listen(
|
||||
account,
|
||||
fileInfo,
|
||||
tab,
|
||||
relatedFileInfo
|
||||
) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(1, fileInfo.id);
|
||||
browser.test.assertEq(undefined, relatedFileInfo);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/1" };
|
||||
});
|
||||
browser.cloudFile.onFileUpload.addListener(
|
||||
function listen(account, fileInfo, tab, relatedFileInfo) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(1, fileInfo.id);
|
||||
browser.test.assertEq(undefined, relatedFileInfo);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/1" };
|
||||
}
|
||||
);
|
||||
// Conversion/upload is not yet supported via WebExt API.
|
||||
browser.test.sendMessage(
|
||||
"convertFile",
|
||||
|
@ -764,24 +761,21 @@ add_task(async function test_compose_attachments() {
|
|||
// the same url is used in tab1. The original attachment should be passed
|
||||
// as relatedFileInfo.
|
||||
const tab2_uploadPromise = new Promise(resolve => {
|
||||
browser.cloudFile.onFileUpload.addListener(function listen(
|
||||
account,
|
||||
fileInfo,
|
||||
tab,
|
||||
relatedFileInfo
|
||||
) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(2, fileInfo.id);
|
||||
browser.test.assertEq("this is renamed file2.txt", fileInfo.name);
|
||||
browser.test.assertEq(1, relatedFileInfo.id);
|
||||
browser.test.assertEq("this is file2.txt", relatedFileInfo.name);
|
||||
browser.test.assertFalse(
|
||||
relatedFileInfo.dataChanged,
|
||||
`data should not have changed`
|
||||
);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/2" };
|
||||
});
|
||||
browser.cloudFile.onFileUpload.addListener(
|
||||
function listen(account, fileInfo, tab, relatedFileInfo) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(2, fileInfo.id);
|
||||
browser.test.assertEq("this is renamed file2.txt", fileInfo.name);
|
||||
browser.test.assertEq(1, relatedFileInfo.id);
|
||||
browser.test.assertEq("this is file2.txt", relatedFileInfo.name);
|
||||
browser.test.assertFalse(
|
||||
relatedFileInfo.dataChanged,
|
||||
`data should not have changed`
|
||||
);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/2" };
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
const composeTab2 = await browser.compose.beginNew({
|
||||
|
@ -868,27 +862,24 @@ add_task(async function test_compose_attachments() {
|
|||
// upload, to not invalidate the original url still used in tab1.
|
||||
|
||||
const tab3_uploadPromise = new Promise(resolve => {
|
||||
browser.cloudFile.onFileUpload.addListener(function listen(
|
||||
account,
|
||||
fileInfo,
|
||||
tab,
|
||||
relatedFileInfo
|
||||
) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(3, fileInfo.id);
|
||||
browser.test.assertEq(
|
||||
"That is going to be interesting.txt",
|
||||
fileInfo.name
|
||||
);
|
||||
browser.test.assertEq(1, relatedFileInfo.id);
|
||||
browser.test.assertEq("this is file2.txt", relatedFileInfo.name);
|
||||
browser.test.assertFalse(
|
||||
relatedFileInfo.dataChanged,
|
||||
`data should not have changed`
|
||||
);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/3" };
|
||||
});
|
||||
browser.cloudFile.onFileUpload.addListener(
|
||||
function listen(account, fileInfo, tab, relatedFileInfo) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(3, fileInfo.id);
|
||||
browser.test.assertEq(
|
||||
"That is going to be interesting.txt",
|
||||
fileInfo.name
|
||||
);
|
||||
browser.test.assertEq(1, relatedFileInfo.id);
|
||||
browser.test.assertEq("this is file2.txt", relatedFileInfo.name);
|
||||
browser.test.assertFalse(
|
||||
relatedFileInfo.dataChanged,
|
||||
`data should not have changed`
|
||||
);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/3" };
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
const tab3_changed2 = await browser.compose.updateAttachment(
|
||||
|
@ -929,27 +920,24 @@ add_task(async function test_compose_attachments() {
|
|||
// renaming both. This should trigger a new file upload.
|
||||
|
||||
const tab4_uploadPromise = new Promise(resolve => {
|
||||
browser.cloudFile.onFileUpload.addListener(function listen(
|
||||
account,
|
||||
fileInfo,
|
||||
tab,
|
||||
relatedFileInfo
|
||||
) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(4, fileInfo.id);
|
||||
browser.test.assertEq(
|
||||
"I got renamed too, how crazy is that!.txt",
|
||||
fileInfo.name
|
||||
);
|
||||
browser.test.assertEq(1, relatedFileInfo.id);
|
||||
browser.test.assertEq("this is file2.txt", relatedFileInfo.name);
|
||||
browser.test.assertFalse(
|
||||
relatedFileInfo.dataChanged,
|
||||
`data should not have changed`
|
||||
);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/4" };
|
||||
});
|
||||
browser.cloudFile.onFileUpload.addListener(
|
||||
function listen(account, fileInfo, tab, relatedFileInfo) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(4, fileInfo.id);
|
||||
browser.test.assertEq(
|
||||
"I got renamed too, how crazy is that!.txt",
|
||||
fileInfo.name
|
||||
);
|
||||
browser.test.assertEq(1, relatedFileInfo.id);
|
||||
browser.test.assertEq("this is file2.txt", relatedFileInfo.name);
|
||||
browser.test.assertFalse(
|
||||
relatedFileInfo.dataChanged,
|
||||
`data should not have changed`
|
||||
);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/4" };
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
const tab4_details = { subject: "Message #5" };
|
||||
|
@ -1068,13 +1056,12 @@ add_task(async function test_compose_attachments() {
|
|||
// delete.
|
||||
|
||||
const tab5_deletePromise = new Promise(resolve => {
|
||||
browser.cloudFile.onFileDeleted.addListener(function listen(
|
||||
account,
|
||||
id
|
||||
) {
|
||||
browser.cloudFile.onFileDeleted.removeListener(listen);
|
||||
setTimeout(() => resolve(id));
|
||||
});
|
||||
browser.cloudFile.onFileDeleted.addListener(
|
||||
function listen(account, id) {
|
||||
browser.cloudFile.onFileDeleted.removeListener(listen);
|
||||
setTimeout(() => resolve(id));
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
await browser.compose.removeAttachment(
|
||||
|
@ -1422,18 +1409,15 @@ add_task(async function test_compose_attachments_immutable() {
|
|||
// Convert the second attachment to a cloudFile attachment.
|
||||
|
||||
await new Promise(resolve => {
|
||||
browser.cloudFile.onFileUpload.addListener(function listen(
|
||||
account,
|
||||
fileInfo,
|
||||
tab,
|
||||
relatedFileInfo
|
||||
) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(1, fileInfo.id);
|
||||
browser.test.assertEq(undefined, relatedFileInfo);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/1" };
|
||||
});
|
||||
browser.cloudFile.onFileUpload.addListener(
|
||||
function listen(account, fileInfo, tab, relatedFileInfo) {
|
||||
browser.cloudFile.onFileUpload.removeListener(listen);
|
||||
browser.test.assertEq(1, fileInfo.id);
|
||||
browser.test.assertEq(undefined, relatedFileInfo);
|
||||
setTimeout(() => resolve());
|
||||
return { url: "https://cloud.provider.net/1" };
|
||||
}
|
||||
);
|
||||
// Conversion/upload is not yet supported via WebExt API.
|
||||
browser.test.sendMessage(
|
||||
"convertFile",
|
||||
|
|
|
@ -192,9 +192,8 @@ add_task(async function testBody() {
|
|||
|
||||
// Get details, plain text message.
|
||||
|
||||
let plainTextDetails = await browser.compose.getComposeDetails(
|
||||
plainTextTabId
|
||||
);
|
||||
let plainTextDetails =
|
||||
await browser.compose.getComposeDetails(plainTextTabId);
|
||||
browser.test.log(JSON.stringify(plainTextDetails));
|
||||
browser.test.assertTrue(plainTextDetails.isPlainText);
|
||||
browser.test.assertTrue(
|
||||
|
@ -213,9 +212,8 @@ add_task(async function testBody() {
|
|||
plainTextBody:
|
||||
plainTextDetails.plainTextBody + "\nIndeed, it is plain.",
|
||||
});
|
||||
plainTextDetails = await browser.compose.getComposeDetails(
|
||||
plainTextTabId
|
||||
);
|
||||
plainTextDetails =
|
||||
await browser.compose.getComposeDetails(plainTextTabId);
|
||||
browser.test.log(JSON.stringify(plainTextDetails));
|
||||
browser.test.assertTrue(plainTextDetails.isPlainText);
|
||||
browser.test.assertTrue(
|
||||
|
@ -610,9 +608,8 @@ add_task(async function testCJK() {
|
|||
|
||||
// Get details, plain text message.
|
||||
|
||||
let plainTextDetails = await browser.compose.getComposeDetails(
|
||||
plainTextTabId
|
||||
);
|
||||
let plainTextDetails =
|
||||
await browser.compose.getComposeDetails(plainTextTabId);
|
||||
browser.test.log(JSON.stringify(plainTextDetails));
|
||||
browser.test.assertTrue(plainTextDetails.isPlainText);
|
||||
browser.test.assertTrue(
|
||||
|
@ -630,9 +627,8 @@ add_task(async function testCJK() {
|
|||
await browser.compose.setComposeDetails(plainTextTabId, {
|
||||
plainTextBody: longCJKString,
|
||||
});
|
||||
plainTextDetails = await browser.compose.getComposeDetails(
|
||||
plainTextTabId
|
||||
);
|
||||
plainTextDetails =
|
||||
await browser.compose.getComposeDetails(plainTextTabId);
|
||||
browser.test.log(JSON.stringify(plainTextDetails));
|
||||
browser.test.assertTrue(plainTextDetails.isPlainText);
|
||||
browser.test.assertTrue(
|
||||
|
|
|
@ -251,9 +251,8 @@ add_task(async function overrideContext_with_context() {
|
|||
await extension.startup();
|
||||
await extension.awaitMessage("menu_items_registered");
|
||||
|
||||
const { tabId, httpUrl, extensionUrl } = await extension.awaitMessage(
|
||||
"setup_ready"
|
||||
);
|
||||
const { tabId, httpUrl, extensionUrl } =
|
||||
await extension.awaitMessage("setup_ready");
|
||||
info(`Set up test with tabId=${tabId}.`);
|
||||
|
||||
{
|
||||
|
|
|
@ -167,9 +167,8 @@ add_task(async () => {
|
|||
|
||||
browser.test.log("Open a message in a window (messageWindow.xhtml).");
|
||||
|
||||
const primedDisplayWindowInfo = await window.sendMessage(
|
||||
"openDisplayWindow"
|
||||
);
|
||||
const primedDisplayWindowInfo =
|
||||
await window.sendMessage("openDisplayWindow");
|
||||
const [{ id: displayWindow }] = await listener.checkEvent(
|
||||
"windows.onCreated",
|
||||
{
|
||||
|
|
|
@ -82,9 +82,8 @@ add_task(async function test_accounts() {
|
|||
browser.test.assertEq(null, account.folders, "Folders not included");
|
||||
}
|
||||
|
||||
const [account2Id, account2Name] = await window.sendMessage(
|
||||
"create account 2"
|
||||
);
|
||||
const [account2Id, account2Name] =
|
||||
await window.sendMessage("create account 2");
|
||||
// The new account is defined as default and should be returned first.
|
||||
const result2 = await browser.accounts.list();
|
||||
browser.test.assertEq(2, result2.length);
|
||||
|
|
|
@ -91,9 +91,8 @@ add_task(async function test_accounts() {
|
|||
);
|
||||
}
|
||||
|
||||
const [account2Id, account2Name] = await window.sendMessage(
|
||||
"create account 2"
|
||||
);
|
||||
const [account2Id, account2Name] =
|
||||
await window.sendMessage("create account 2");
|
||||
// The new account is defined as default and should be returned first.
|
||||
const result2 = await browser.accounts.list(true);
|
||||
browser.test.assertEq(2, result2.length);
|
||||
|
@ -169,17 +168,15 @@ add_task(async function test_accounts() {
|
|||
"Folders not included"
|
||||
);
|
||||
|
||||
const result3WithoutFoldersDefault = await browser.accounts.get(
|
||||
account1Id
|
||||
);
|
||||
const result3WithoutFoldersDefault =
|
||||
await browser.accounts.get(account1Id);
|
||||
browser.test.assertEq(
|
||||
undefined,
|
||||
result3WithoutFoldersDefault.rootFolder.subFolders,
|
||||
"Folders not included"
|
||||
);
|
||||
const result4WithoutFoldersDefault = await browser.accounts.get(
|
||||
account2Id
|
||||
);
|
||||
const result4WithoutFoldersDefault =
|
||||
await browser.accounts.get(account2Id);
|
||||
browser.test.assertEq(
|
||||
undefined,
|
||||
result4WithoutFoldersDefault.rootFolder.subFolders,
|
||||
|
|
|
@ -598,9 +598,8 @@ add_task(async function test_addressBooks() {
|
|||
{ type: "mailingList", parentId: firstBookId, id: newMailingListId },
|
||||
]);
|
||||
|
||||
const updatedMailingList = await browser.mailingLists.get(
|
||||
newMailingListId
|
||||
);
|
||||
const updatedMailingList =
|
||||
await browser.mailingLists.get(newMailingListId);
|
||||
browser.test.assertEq("name!", updatedMailingList.name);
|
||||
browser.test.assertEq("nickname!", updatedMailingList.nickName);
|
||||
browser.test.assertEq("description!", updatedMailingList.description);
|
||||
|
@ -612,9 +611,8 @@ add_task(async function test_addressBooks() {
|
|||
{ type: "contact", parentId: newMailingListId, id: newContactId },
|
||||
]);
|
||||
|
||||
let listMembers = await browser.mailingLists.listMembers(
|
||||
newMailingListId
|
||||
);
|
||||
let listMembers =
|
||||
await browser.mailingLists.listMembers(newMailingListId);
|
||||
browser.test.assertTrue(Array.isArray(listMembers));
|
||||
browser.test.assertEq(1, listMembers.length);
|
||||
|
||||
|
@ -2338,9 +2336,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
},
|
||||
`BEGIN:VCARD\r\nVERSION:4.0\r\nNOTE:Notes\r\nN:last;first;;;\r\nUID:${newContactId}\r\nEND:VCARD\r\n`,
|
||||
]);
|
||||
const updatedContact = await browser.addressBooks.contacts.get(
|
||||
newContactId
|
||||
);
|
||||
const updatedContact =
|
||||
await browser.addressBooks.contacts.get(newContactId);
|
||||
browser.test.assertEq(6, Object.keys(updatedContact).length);
|
||||
browser.test.assertEq(newContactId, updatedContact.id);
|
||||
browser.test.assertEq(firstBookId, updatedContact.parentId);
|
||||
|
@ -2366,9 +2363,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
},
|
||||
`BEGIN:VCARD\r\nVERSION:4.0\r\nEMAIL;PREF=1:first@last.invalid\r\nNOTE:Notes2\r\nN:last2;first2;;;\r\nUID:${newContactId}\r\nEND:VCARD\r\n`,
|
||||
]);
|
||||
const updatedContact2 = await browser.addressBooks.contacts.get(
|
||||
newContactId
|
||||
);
|
||||
const updatedContact2 =
|
||||
await browser.addressBooks.contacts.get(newContactId);
|
||||
browser.test.assertEq(6, Object.keys(updatedContact2).length);
|
||||
browser.test.assertEq(newContactId, updatedContact2.id);
|
||||
browser.test.assertEq(firstBookId, updatedContact2.parentId);
|
||||
|
@ -2408,9 +2404,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
vCard: `BEGIN:VCARD\r\nVERSION:4.0\r\nNOTE:Notes3\r\nN:last3;first3;;;\r\nUID:${fixedContactId}\r\nEND:VCARD\r\n`,
|
||||
},
|
||||
]);
|
||||
const fixedContact = await browser.addressBooks.contacts.get(
|
||||
fixedContactId
|
||||
);
|
||||
const fixedContact =
|
||||
await browser.addressBooks.contacts.get(fixedContactId);
|
||||
browser.test.assertEq(6, Object.keys(fixedContact).length);
|
||||
browser.test.assertEq(fixedContactId, fixedContact.id);
|
||||
browser.test.assertEq(firstBookId, fixedContact.parentId);
|
||||
|
@ -2452,9 +2447,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
|
||||
async function mailingListsTest() {
|
||||
browser.test.log("Starting mailingListsTest");
|
||||
let mailingLists = await browser.addressBooks.mailingLists.list(
|
||||
firstBookId
|
||||
);
|
||||
let mailingLists =
|
||||
await browser.addressBooks.mailingLists.list(firstBookId);
|
||||
browser.test.assertTrue(Array.isArray(mailingLists));
|
||||
browser.test.assertEq(0, mailingLists.length);
|
||||
|
||||
|
@ -2485,9 +2479,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
"List not added to second book."
|
||||
);
|
||||
|
||||
const newAddressList = await browser.addressBooks.mailingLists.get(
|
||||
newMailingListId
|
||||
);
|
||||
const newAddressList =
|
||||
await browser.addressBooks.mailingLists.get(newMailingListId);
|
||||
browser.test.assertEq(8, Object.keys(newAddressList).length);
|
||||
browser.test.assertEq(newMailingListId, newAddressList.id);
|
||||
browser.test.assertEq(firstBookId, newAddressList.parentId);
|
||||
|
@ -2534,9 +2527,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
{ type: "mailingList", parentId: firstBookId, id: newMailingListId },
|
||||
]);
|
||||
|
||||
const updatedMailingList = await browser.addressBooks.mailingLists.get(
|
||||
newMailingListId
|
||||
);
|
||||
const updatedMailingList =
|
||||
await browser.addressBooks.mailingLists.get(newMailingListId);
|
||||
browser.test.assertEq("name!", updatedMailingList.name);
|
||||
browser.test.assertEq("nickname!", updatedMailingList.nickName);
|
||||
browser.test.assertEq("description!", updatedMailingList.description);
|
||||
|
@ -2551,9 +2543,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
{ type: "contact", parentId: newMailingListId, id: newContactId },
|
||||
]);
|
||||
|
||||
let listMembers = await browser.addressBooks.mailingLists.listMembers(
|
||||
newMailingListId
|
||||
);
|
||||
let listMembers =
|
||||
await browser.addressBooks.mailingLists.listMembers(newMailingListId);
|
||||
browser.test.assertTrue(Array.isArray(listMembers));
|
||||
browser.test.assertEq(1, listMembers.length);
|
||||
|
||||
|
@ -2584,9 +2575,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
{ type: "contact", parentId: newMailingListId, id: anotherContactId },
|
||||
]);
|
||||
|
||||
listMembers = await browser.addressBooks.mailingLists.listMembers(
|
||||
newMailingListId
|
||||
);
|
||||
listMembers =
|
||||
await browser.addressBooks.mailingLists.listMembers(newMailingListId);
|
||||
browser.test.assertEq(2, listMembers.length);
|
||||
|
||||
await browser.addressBooks.contacts.delete(anotherContactId);
|
||||
|
@ -2599,9 +2589,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
anotherContactId,
|
||||
]
|
||||
);
|
||||
listMembers = await browser.addressBooks.mailingLists.listMembers(
|
||||
newMailingListId
|
||||
);
|
||||
listMembers =
|
||||
await browser.addressBooks.mailingLists.listMembers(newMailingListId);
|
||||
browser.test.assertEq(1, listMembers.length);
|
||||
|
||||
await browser.addressBooks.mailingLists.removeMember(
|
||||
|
@ -2614,9 +2603,8 @@ add_task(async function test_addressBooks_mv3() {
|
|||
newMailingListId,
|
||||
newContactId,
|
||||
]);
|
||||
listMembers = await browser.addressBooks.mailingLists.listMembers(
|
||||
newMailingListId
|
||||
);
|
||||
listMembers =
|
||||
await browser.addressBooks.mailingLists.listMembers(newMailingListId);
|
||||
browser.test.assertEq(0, listMembers.length);
|
||||
|
||||
await browser.addressBooks.mailingLists.delete(newMailingListId);
|
||||
|
|
|
@ -24,9 +24,8 @@ add_task(async function test_managers() {
|
|||
messages: [testMessage],
|
||||
} = await browser.messages.list(testFolder.id);
|
||||
|
||||
const testFolderPrettyPath = await browser.testapi.testCanGetFolder(
|
||||
testFolder
|
||||
);
|
||||
const testFolderPrettyPath =
|
||||
await browser.testapi.testCanGetFolder(testFolder);
|
||||
browser.test.assertEq("test1", testFolderPrettyPath);
|
||||
|
||||
// Check that Foldermanager.get() (used by testapi.testCanGetFolder()) also
|
||||
|
@ -39,9 +38,8 @@ add_task(async function test_managers() {
|
|||
!!unifiedInbox,
|
||||
"Should find the unified inbox folder"
|
||||
);
|
||||
const inboxFolderPrettyPath = await browser.testapi.testCanGetFolder(
|
||||
unifiedInbox
|
||||
);
|
||||
const inboxFolderPrettyPath =
|
||||
await browser.testapi.testCanGetFolder(unifiedInbox);
|
||||
browser.test.assertEq("Inbox", inboxFolderPrettyPath);
|
||||
|
||||
const convertedFolder = await browser.testapi.testCanConvertFolder();
|
||||
|
@ -71,9 +69,8 @@ add_task(async function test_managers() {
|
|||
testMessage.subject != messageList.messages[0].subject
|
||||
);
|
||||
|
||||
const [bookUID, contactUID, listUID] = await window.sendMessage(
|
||||
"get UIDs"
|
||||
);
|
||||
const [bookUID, contactUID, listUID] =
|
||||
await window.sendMessage("get UIDs");
|
||||
const [foundBook, foundContact, foundList] =
|
||||
await browser.testapi.testCanFindAddressBookItems(
|
||||
bookUID,
|
||||
|
|
|
@ -486,9 +486,8 @@ add_task(
|
|||
}
|
||||
);
|
||||
|
||||
const subFolders0 = await browser.folders.getSubFolders(
|
||||
nestedRootFolder
|
||||
);
|
||||
const subFolders0 =
|
||||
await browser.folders.getSubFolders(nestedRootFolder);
|
||||
window.assertDeepEqual(
|
||||
expectedNestedRootFolder.subFolders,
|
||||
subFolders0,
|
||||
|
@ -634,9 +633,8 @@ add_task(
|
|||
];
|
||||
|
||||
// Use default include option which is not to include subfolders.
|
||||
const parentsWithDefSubs = await browser.folders.getParentFolders(
|
||||
lastChild
|
||||
);
|
||||
const parentsWithDefSubs =
|
||||
await browser.folders.getParentFolders(lastChild);
|
||||
window.assertDeepEqual(
|
||||
expectedParentFolders,
|
||||
parentsWithDefSubs,
|
||||
|
@ -826,9 +824,8 @@ add_task(async function test_deny_folders_operations() {
|
|||
)
|
||||
: account.rootFolder;
|
||||
|
||||
const capabilities = await browser.folders.getFolderCapabilities(
|
||||
folder
|
||||
);
|
||||
const capabilities =
|
||||
await browser.folders.getFolderCapabilities(folder);
|
||||
browser.test.assertTrue(
|
||||
!capabilities.canAddSubfolders,
|
||||
"Folder should not allow to create subfolders"
|
||||
|
@ -845,9 +842,8 @@ add_task(async function test_deny_folders_operations() {
|
|||
|
||||
{
|
||||
const folder = account.rootFolder;
|
||||
const capabilities = await browser.folders.getFolderCapabilities(
|
||||
folder
|
||||
);
|
||||
const capabilities =
|
||||
await browser.folders.getFolderCapabilities(folder);
|
||||
browser.test.assertTrue(
|
||||
!capabilities.canBeRenamed,
|
||||
"Folder should not allow to be renamed"
|
||||
|
@ -864,9 +860,8 @@ add_task(async function test_deny_folders_operations() {
|
|||
|
||||
{
|
||||
const folder = account.rootFolder;
|
||||
const capabilities = await browser.folders.getFolderCapabilities(
|
||||
folder
|
||||
);
|
||||
const capabilities =
|
||||
await browser.folders.getFolderCapabilities(folder);
|
||||
browser.test.assertTrue(
|
||||
!capabilities.canBeDeleted,
|
||||
"Folder should not allow to be deleted"
|
||||
|
|
|
@ -198,9 +198,8 @@ add_task(async function test_FolderInfo_FolderCapabilities_and_query() {
|
|||
"Returned MailFolderInfo should be correct."
|
||||
);
|
||||
|
||||
const capabilities = await browser.folders.getFolderCapabilities(
|
||||
InfoTestFolder
|
||||
);
|
||||
const capabilities =
|
||||
await browser.folders.getFolderCapabilities(InfoTestFolder);
|
||||
window.assertDeepEqual(
|
||||
{
|
||||
canAddMessages: account.type != "nntp",
|
||||
|
|
|
@ -145,9 +145,8 @@ add_task(
|
|||
const { folders } = await browser.accounts.get(accountId);
|
||||
const testFolder4 = folders.find(f => f.name == "test4");
|
||||
|
||||
const { messages: folder4Messages } = await browser.messages.list(
|
||||
testFolder4
|
||||
);
|
||||
const { messages: folder4Messages } =
|
||||
await browser.messages.list(testFolder4);
|
||||
|
||||
// Try to delete a message.
|
||||
await browser.test.assertThrows(
|
||||
|
@ -191,9 +190,8 @@ add_task(
|
|||
const testFolder4 = folders.find(f => f.name == "test4");
|
||||
const testFolder3 = folders.find(f => f.name == "test3");
|
||||
|
||||
const { messages: folder4Messages } = await browser.messages.list(
|
||||
testFolder4
|
||||
);
|
||||
const { messages: folder4Messages } =
|
||||
await browser.messages.list(testFolder4);
|
||||
|
||||
// Try to move a message.
|
||||
await browser.test.assertRejects(
|
||||
|
@ -242,9 +240,8 @@ add_task(
|
|||
const [accountId] = await window.waitForMessage();
|
||||
const { folders } = await browser.accounts.get(accountId);
|
||||
const testFolder4 = folders.find(f => f.name == "test4");
|
||||
const { messages: folder4Messages } = await browser.messages.list(
|
||||
testFolder4
|
||||
);
|
||||
const { messages: folder4Messages } =
|
||||
await browser.messages.list(testFolder4);
|
||||
|
||||
const tags1 = await browser.messages.listTags();
|
||||
window.assertDeepEqual(
|
||||
|
|
|
@ -20,9 +20,8 @@ add_task(async function test_formatFileSize() {
|
|||
{ sizeInBytes: 2344234234, expectedFormat: "2.2 GB" },
|
||||
];
|
||||
for (const { sizeInBytes, expectedFormat } of tests) {
|
||||
const formated = await browser.messengerUtilities.formatFileSize(
|
||||
sizeInBytes
|
||||
);
|
||||
const formated =
|
||||
await browser.messengerUtilities.formatFileSize(sizeInBytes);
|
||||
// On some systems we get a , seperator.
|
||||
browser.test.assertEq(
|
||||
formated.replaceAll(",", "."),
|
||||
|
|
|
@ -462,9 +462,8 @@ var GlodaIMIndexer = {
|
|||
(async () => {
|
||||
// We need to get the log files every time, because a new log file might
|
||||
// have been started since we last got them.
|
||||
const logFiles = await IMServices.logs.getLogPathsForConversation(
|
||||
aConversation
|
||||
);
|
||||
const logFiles =
|
||||
await IMServices.logs.getLogPathsForConversation(aConversation);
|
||||
if (!logFiles || !logFiles.length) {
|
||||
// No log files exist yet, nothing to do!
|
||||
return;
|
||||
|
|
|
@ -452,9 +452,8 @@ async function getAvailableLocales() {
|
|||
// for lastFallbackLocale for it to be useful.
|
||||
if (defaultLocale != lastFallbackLocale) {
|
||||
const lastFallbackId = `langpack-${lastFallbackLocale}@thunderbird.mozilla.org`;
|
||||
const lastFallbackInstalled = await AddonManager.getAddonByID(
|
||||
lastFallbackId
|
||||
);
|
||||
const lastFallbackInstalled =
|
||||
await AddonManager.getAddonByID(lastFallbackId);
|
||||
if (!lastFallbackInstalled) {
|
||||
return availableLocales.filter(locale => locale != lastFallbackLocale);
|
||||
}
|
||||
|
|
|
@ -49,11 +49,10 @@ export const qrExportPane = {
|
|||
const oAuthUsage = lazy.QRExport.getAccountOAuthUsage(account);
|
||||
checkbox.dataset.hasOauth = oAuthUsage.incoming || oAuthUsage.outgoing;
|
||||
checkbox.dataset.oauthOnly = oAuthUsage.incoming && oAuthUsage.outgoing;
|
||||
item.querySelector(
|
||||
"li"
|
||||
).title = `${incomingServer.type.toUpperCase()}: ${
|
||||
incomingServer.username
|
||||
} - ${incomingServer.hostName}:${incomingServer.port}`;
|
||||
item.querySelector("li").title =
|
||||
`${incomingServer.type.toUpperCase()}: ${
|
||||
incomingServer.username
|
||||
} - ${incomingServer.hostName}:${incomingServer.port}`;
|
||||
return item;
|
||||
})
|
||||
);
|
||||
|
|
|
@ -32,8 +32,8 @@ const Template = ({ resizeDirection, collapseWidth, collapseHeight }) => html`
|
|||
grid-template-${
|
||||
resizeDirection === "horizontal" ? "columns" : "rows"
|
||||
}: minmax(auto, var(--splitter-${
|
||||
resizeDirection === "horizontal" ? "width" : "height"
|
||||
})) 0 auto;
|
||||
resizeDirection === "horizontal" ? "width" : "height"
|
||||
})) 0 auto;
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
margin: 1em;
|
||||
|
|
|
@ -173,8 +173,8 @@ var gFunctions = [
|
|||
n % 10 == 1 && n % 100 != 11
|
||||
? 0
|
||||
: n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20)
|
||||
? 2
|
||||
: 1,
|
||||
? 2
|
||||
: 1,
|
||||
],
|
||||
// 7: Russian
|
||||
[
|
||||
|
@ -183,8 +183,8 @@ var gFunctions = [
|
|||
n % 10 == 1 && n % 100 != 11
|
||||
? 0
|
||||
: n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20)
|
||||
? 1
|
||||
: 2,
|
||||
? 1
|
||||
: 2,
|
||||
],
|
||||
// 8: Slovak
|
||||
[3, n => (n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2)],
|
||||
|
@ -195,8 +195,8 @@ var gFunctions = [
|
|||
n == 1
|
||||
? 0
|
||||
: n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20)
|
||||
? 1
|
||||
: 2,
|
||||
? 1
|
||||
: 2,
|
||||
],
|
||||
// 10: Slovenian
|
||||
[
|
||||
|
@ -205,10 +205,10 @@ var gFunctions = [
|
|||
n % 100 == 1
|
||||
? 0
|
||||
: n % 100 == 2
|
||||
? 1
|
||||
: n % 100 == 3 || n % 100 == 4
|
||||
? 2
|
||||
: 3,
|
||||
? 1
|
||||
: n % 100 == 3 || n % 100 == 4
|
||||
? 2
|
||||
: 3,
|
||||
],
|
||||
// 11: Irish Gaeilge
|
||||
[
|
||||
|
@ -217,12 +217,12 @@ var gFunctions = [
|
|||
n == 1
|
||||
? 0
|
||||
: n == 2
|
||||
? 1
|
||||
: n >= 3 && n <= 6
|
||||
? 2
|
||||
: n >= 7 && n <= 10
|
||||
? 3
|
||||
: 4,
|
||||
? 1
|
||||
: n >= 3 && n <= 6
|
||||
? 2
|
||||
: n >= 7 && n <= 10
|
||||
? 3
|
||||
: 4,
|
||||
],
|
||||
// 12: Arabic
|
||||
[
|
||||
|
@ -231,14 +231,14 @@ var gFunctions = [
|
|||
n == 0
|
||||
? 5
|
||||
: n == 1
|
||||
? 0
|
||||
: n == 2
|
||||
? 1
|
||||
: n % 100 >= 3 && n % 100 <= 10
|
||||
? 2
|
||||
: n % 100 >= 11 && n % 100 <= 99
|
||||
? 3
|
||||
: 4,
|
||||
? 0
|
||||
: n == 2
|
||||
? 1
|
||||
: n % 100 >= 3 && n % 100 <= 10
|
||||
? 2
|
||||
: n % 100 >= 11 && n % 100 <= 99
|
||||
? 3
|
||||
: 4,
|
||||
],
|
||||
// 13: Maltese
|
||||
[
|
||||
|
@ -247,10 +247,10 @@ var gFunctions = [
|
|||
n == 1
|
||||
? 0
|
||||
: n == 0 || (n % 100 > 0 && n % 100 <= 10)
|
||||
? 1
|
||||
: n % 100 > 10 && n % 100 < 20
|
||||
? 2
|
||||
: 3,
|
||||
? 1
|
||||
: n % 100 > 10 && n % 100 < 20
|
||||
? 2
|
||||
: 3,
|
||||
],
|
||||
// 14: Unused
|
||||
[3, n => (n % 10 == 1 ? 0 : n % 10 == 2 ? 1 : 2)],
|
||||
|
@ -263,21 +263,21 @@ var gFunctions = [
|
|||
n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91
|
||||
? 0
|
||||
: n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92
|
||||
? 1
|
||||
: (n % 10 == 3 || n % 10 == 4 || n % 10 == 9) &&
|
||||
n % 100 != 13 &&
|
||||
n % 100 != 14 &&
|
||||
n % 100 != 19 &&
|
||||
n % 100 != 73 &&
|
||||
n % 100 != 74 &&
|
||||
n % 100 != 79 &&
|
||||
n % 100 != 93 &&
|
||||
n % 100 != 94 &&
|
||||
n % 100 != 99
|
||||
? 2
|
||||
: n % 1000000 == 0 && n != 0
|
||||
? 3
|
||||
: 4,
|
||||
? 1
|
||||
: (n % 10 == 3 || n % 10 == 4 || n % 10 == 9) &&
|
||||
n % 100 != 13 &&
|
||||
n % 100 != 14 &&
|
||||
n % 100 != 19 &&
|
||||
n % 100 != 73 &&
|
||||
n % 100 != 74 &&
|
||||
n % 100 != 79 &&
|
||||
n % 100 != 93 &&
|
||||
n % 100 != 94 &&
|
||||
n % 100 != 99
|
||||
? 2
|
||||
: n % 1000000 == 0 && n != 0
|
||||
? 3
|
||||
: 4,
|
||||
],
|
||||
// 17: Shuar
|
||||
[2, n => (n != 0 ? 1 : 0)],
|
||||
|
@ -293,8 +293,8 @@ var gFunctions = [
|
|||
n % 10 == 1 && n % 100 != 11
|
||||
? 0
|
||||
: n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20)
|
||||
? 1
|
||||
: 2,
|
||||
? 1
|
||||
: 2,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
@ -66,9 +66,8 @@ add_task(async function test_draft_with_cloudFile_attachment() {
|
|||
const files = collectFiles(kFiles);
|
||||
MockFilePicker.setFiles(files);
|
||||
|
||||
const cloudFileAccount = await gCloudFileProvider.createAccount(
|
||||
"validAccount"
|
||||
);
|
||||
const cloudFileAccount =
|
||||
await gCloudFileProvider.createAccount("validAccount");
|
||||
const draft = await createAndCloseDraftWithCloudAttachment(cloudFileAccount);
|
||||
const expectedUpload = { ...draft.upload };
|
||||
|
||||
|
@ -256,9 +255,8 @@ add_task(async function test_draft_with_cloudFile_attachment_no_account() {
|
|||
const files = collectFiles(kFiles);
|
||||
MockFilePicker.setFiles(files);
|
||||
|
||||
const cloudFileAccount = await gCloudFileProvider.createAccount(
|
||||
"invalidAccount"
|
||||
);
|
||||
const cloudFileAccount =
|
||||
await gCloudFileProvider.createAccount("invalidAccount");
|
||||
const draft = await createAndCloseDraftWithCloudAttachment(cloudFileAccount);
|
||||
const expectedUpload = { ...draft.upload };
|
||||
|
||||
|
@ -352,9 +350,8 @@ add_task(async function test_draft_with_cloudFile_attachment_no_file() {
|
|||
);
|
||||
MockFilePicker.setFiles([tempFile.file]);
|
||||
|
||||
const cloudFileAccount = await gCloudFileProvider.createAccount(
|
||||
"validAccountNoFile"
|
||||
);
|
||||
const cloudFileAccount =
|
||||
await gCloudFileProvider.createAccount("validAccountNoFile");
|
||||
const draft = await createAndCloseDraftWithCloudAttachment(cloudFileAccount);
|
||||
const expectedUpload = { ...draft.upload };
|
||||
|
||||
|
|
|
@ -177,9 +177,12 @@ export function check_element_visible(aWin, aId) {
|
|||
* @param {string} aId - ID of the element to wait for.
|
||||
*/
|
||||
export async function promise_element_visible(aWin, aId) {
|
||||
await TestUtils.waitForCondition(function () {
|
||||
return check_element_visible(aWin, aId);
|
||||
}, "Timed out waiting for element with ID=" + aId + " to become visible");
|
||||
await TestUtils.waitForCondition(
|
||||
function () {
|
||||
return check_element_visible(aWin, aId);
|
||||
},
|
||||
"Timed out waiting for element with ID=" + aId + " to become visible"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -189,7 +192,10 @@ export async function promise_element_visible(aWin, aId) {
|
|||
* @param {string} aId - ID of the element to wait for.
|
||||
*/
|
||||
export async function promise_element_invisible(aWin, aId) {
|
||||
await TestUtils.waitForCondition(function () {
|
||||
return !check_element_visible(aWin, aId);
|
||||
}, "Timed out waiting for element with ID=" + aId + " to become invisible");
|
||||
await TestUtils.waitForCondition(
|
||||
function () {
|
||||
return !check_element_visible(aWin, aId);
|
||||
},
|
||||
"Timed out waiting for element with ID=" + aId + " to become invisible"
|
||||
);
|
||||
}
|
||||
|
|
|
@ -134,13 +134,16 @@ export async function wait_for_notification_to_show(aWindow, aBoxId, aValue) {
|
|||
throw new Error("Couldn't find a notification box for id=" + aBoxId);
|
||||
}
|
||||
|
||||
await TestUtils.waitForCondition(function () {
|
||||
if (nb.querySelector(".notificationbox-stack")) {
|
||||
const box = nb.querySelector(".notificationbox-stack")._notificationBox;
|
||||
return box.getNotificationWithValue(aValue) != null && !box._animating;
|
||||
}
|
||||
return false;
|
||||
}, "Timed out waiting for notification with value " + aValue + " to show.");
|
||||
await TestUtils.waitForCondition(
|
||||
function () {
|
||||
if (nb.querySelector(".notificationbox-stack")) {
|
||||
const box = nb.querySelector(".notificationbox-stack")._notificationBox;
|
||||
return box.getNotificationWithValue(aValue) != null && !box._animating;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
"Timed out waiting for notification with value " + aValue + " to show."
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -306,27 +306,23 @@ function folderPropsOnLoad() {
|
|||
|
||||
if (gMsgFolder.getFlag(Ci.nsMsgFolderFlags.Offline)) {
|
||||
if (serverType == "imap" || serverType == "pop3") {
|
||||
document.getElementById(
|
||||
"offline.selectForOfflineFolder"
|
||||
).checked = true;
|
||||
document.getElementById("offline.selectForOfflineFolder").checked =
|
||||
true;
|
||||
}
|
||||
|
||||
if (serverType == "nntp") {
|
||||
document.getElementById(
|
||||
"offline.selectForOfflineNewsgroup"
|
||||
).checked = true;
|
||||
document.getElementById("offline.selectForOfflineNewsgroup").checked =
|
||||
true;
|
||||
}
|
||||
} else {
|
||||
if (serverType == "imap" || serverType == "pop3") {
|
||||
document.getElementById(
|
||||
"offline.selectForOfflineFolder"
|
||||
).checked = false;
|
||||
document.getElementById("offline.selectForOfflineFolder").checked =
|
||||
false;
|
||||
}
|
||||
|
||||
if (serverType == "nntp") {
|
||||
document.getElementById(
|
||||
"offline.selectForOfflineNewsgroup"
|
||||
).checked = false;
|
||||
document.getElementById("offline.selectForOfflineNewsgroup").checked =
|
||||
false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -818,14 +818,17 @@ export class ImapClient {
|
|||
this._sendTagged("IDLE");
|
||||
this._setSocketTimeout(PR_UINT32_MAX);
|
||||
this._idling = true;
|
||||
this._idleTimer = setTimeout(() => {
|
||||
this.endIdle(() => {
|
||||
this._actionNoop();
|
||||
});
|
||||
// Per rfc2177, should terminate the IDLE and re-issue it at least every
|
||||
// 29 minutes. But in practice many servers timeout before that. A noop
|
||||
// every 5min is better than timeout.
|
||||
}, 5 * 60 * 1000);
|
||||
this._idleTimer = setTimeout(
|
||||
() => {
|
||||
this.endIdle(() => {
|
||||
this._actionNoop();
|
||||
});
|
||||
// Per rfc2177, should terminate the IDLE and re-issue it at least every
|
||||
// 29 minutes. But in practice many servers timeout before that. A noop
|
||||
// every 5min is better than timeout.
|
||||
},
|
||||
5 * 60 * 1000
|
||||
);
|
||||
this._logger.debug(`Idling in ${this.folder.URI}`);
|
||||
}
|
||||
|
||||
|
|
|
@ -244,9 +244,8 @@ export class ImapIncomingServer extends MsgIncomingServer {
|
|||
return;
|
||||
}
|
||||
|
||||
folder.QueryInterface(
|
||||
Ci.nsIMsgImapMailFolder
|
||||
).verifiedAsOnlineFolder = false;
|
||||
folder.QueryInterface(Ci.nsIMsgImapMailFolder).verifiedAsOnlineFolder =
|
||||
false;
|
||||
for (const child of folder.subFolders) {
|
||||
this._setFolderToUnverified(child);
|
||||
}
|
||||
|
|
|
@ -74,9 +74,8 @@ class CsvFieldMap extends HTMLElement {
|
|||
select.add(option);
|
||||
} else {
|
||||
select.disabled = true;
|
||||
select
|
||||
.closest("tr")
|
||||
.querySelector("input[type=checkbox]").checked = false;
|
||||
select.closest("tr").querySelector("input[type=checkbox]").checked =
|
||||
false;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче