Bug 1786655 - Use PascalCase for class names in Imapd.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D155442 --HG-- extra : rebase_source : bcc41a11e32b07b08bd360c27a453ca0eaf98a26 extra : amend_source : 8ec9673ee8ebd90cbc843c5407cead88f2d3af57
This commit is contained in:
Родитель
2f8bd68359
Коммит
a7bafb2391
|
@ -153,12 +153,12 @@ async function getUtilsJS() {
|
|||
|
||||
var IMAPServer = {
|
||||
open() {
|
||||
let { imapDaemon, imapMessage, IMAP_RFC3501_handler } = ChromeUtils.import(
|
||||
let { ImapDaemon, ImapMessage, IMAP_RFC3501_handler } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/Imapd.jsm"
|
||||
);
|
||||
IMAPServer.imapMessage = imapMessage;
|
||||
IMAPServer.ImapMessage = ImapMessage;
|
||||
|
||||
this.daemon = new imapDaemon();
|
||||
this.daemon = new ImapDaemon();
|
||||
this.server = new nsMailServer(
|
||||
daemon => new IMAP_RFC3501_handler(daemon),
|
||||
this.daemon
|
||||
|
@ -183,7 +183,7 @@ var IMAPServer = {
|
|||
let msgURI = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(message)
|
||||
);
|
||||
let imapMsg = new IMAPServer.imapMessage(
|
||||
let imapMsg = new IMAPServer.ImapMessage(
|
||||
msgURI.spec,
|
||||
fakeFolder.uidnext++,
|
||||
[]
|
||||
|
|
|
@ -61,8 +61,8 @@ var imapUser = {
|
|||
var IMAPServer = {
|
||||
open() {
|
||||
const {
|
||||
imapDaemon,
|
||||
imapMessage,
|
||||
ImapDaemon,
|
||||
ImapMessage,
|
||||
IMAP_RFC2195_extension,
|
||||
IMAP_RFC3501_handler,
|
||||
mixinExtension,
|
||||
|
@ -70,9 +70,9 @@ var IMAPServer = {
|
|||
const { nsMailServer } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/Maild.jsm"
|
||||
);
|
||||
IMAPServer.imapMessage = imapMessage;
|
||||
IMAPServer.ImapMessage = ImapMessage;
|
||||
|
||||
this.daemon = new imapDaemon();
|
||||
this.daemon = new ImapDaemon();
|
||||
this.server = new nsMailServer(daemon => {
|
||||
let handler = new IMAP_RFC3501_handler(daemon);
|
||||
mixinExtension(handler, IMAP_RFC2195_extension);
|
||||
|
|
|
@ -19,7 +19,7 @@ const { PromiseTestUtils } = ChromeUtils.import(
|
|||
var { IMAPPump, setupIMAPPump, teardownIMAPPump } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/IMAPpump.jsm"
|
||||
);
|
||||
var { imapMessage } = ChromeUtils.import(
|
||||
var { ImapMessage } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/Imapd.jsm"
|
||||
);
|
||||
|
||||
|
@ -48,7 +48,7 @@ var gTestArray = [
|
|||
// the main test
|
||||
async function loadImapMessage() {
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
let promiseUrlListener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(
|
||||
|
|
|
@ -18,7 +18,7 @@ var { PromiseTestUtils } = ChromeUtils.import(
|
|||
var { mailTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/MailTestUtils.jsm"
|
||||
);
|
||||
var { imapMessage } = ChromeUtils.import(
|
||||
var { ImapMessage } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/Imapd.jsm"
|
||||
);
|
||||
var { IMAPPump, setupIMAPPump, teardownIMAPPump } = ChromeUtils.import(
|
||||
|
@ -44,7 +44,7 @@ registerCleanupFunction(function() {
|
|||
* Creates a SyntheticMessage and prepares it for loading it
|
||||
* into a fake IMAP inbox.
|
||||
*
|
||||
* @returns {[imapMessage, SyntheticMessage]}
|
||||
* @returns {[ImapMessage, SyntheticMessage]}
|
||||
*/
|
||||
async function createMessage() {
|
||||
let gMessageGenerator = new MessageGenerator();
|
||||
|
@ -54,18 +54,18 @@ async function createMessage() {
|
|||
"data:text/plain;base64," + btoa(synthMessage.toMessageString())
|
||||
);
|
||||
let imapInbox = IMAPPump.daemon.getMailbox("INBOX");
|
||||
let imapMessageFromSynthMsg = new imapMessage(
|
||||
let ImapMessageFromSynthMsg = new ImapMessage(
|
||||
msgURI.spec,
|
||||
imapInbox.uidnext++,
|
||||
[]
|
||||
);
|
||||
return [imapMessageFromSynthMsg, synthMessage];
|
||||
return [ImapMessageFromSynthMsg, synthMessage];
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a fake msg to a fake IMAP.
|
||||
*
|
||||
* @param {imapMessage} fooMessage
|
||||
* @param {ImapMessage} fooMessage
|
||||
*/
|
||||
async function addImapMessage(fooMessage) {
|
||||
IMAPPump.mailbox.addMessage(fooMessage);
|
||||
|
@ -89,7 +89,7 @@ async function saveAndLoad(fileEnding) {
|
|||
"Sanity check if the file ending is intact"
|
||||
);
|
||||
|
||||
// Get the imapMessage.
|
||||
// Get the ImapMessage.
|
||||
let hdr = mailTestUtils.firstMsgHdr(IMAPPump.inbox);
|
||||
let uri = IMAPPump.inbox.getUriForMsg(hdr);
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ var {
|
|||
} = ChromeUtils.import("resource://testing-common/mailnews/Maild.jsm");
|
||||
|
||||
var {
|
||||
imapDaemon,
|
||||
imapMessage,
|
||||
ImapDaemon,
|
||||
ImapMessage,
|
||||
configurations,
|
||||
IMAP_RFC3501_handler,
|
||||
mixinExtension,
|
||||
|
@ -174,7 +174,7 @@ function addImapMessage() {
|
|||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messages[0].toMessageString())
|
||||
);
|
||||
let imapMsg = new imapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
let imapMsg = new ImapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(imapMsg);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ var gMsgImapInboxFolder;
|
|||
|
||||
// Adds some messages directly to a mailbox (eg new mail)
|
||||
function addMessagesToServer(messages, mailbox) {
|
||||
// Create the imapMessages and store them on the mailbox
|
||||
// Create the ImapMessages and store them on the mailbox
|
||||
messages.forEach(function(message) {
|
||||
let dataUri = "data:text/plain," + message.toMessageString();
|
||||
mailbox.addMessage(new imapMessage(dataUri, mailbox.uidnext++, []));
|
||||
mailbox.addMessage(new ImapMessage(dataUri, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ add_task(async function setupTest() {
|
|||
.QueryInterface(Ci.nsIFileURL);
|
||||
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
|
||||
// ...and download for offline use.
|
||||
|
|
|
@ -31,7 +31,7 @@ async function setup() {
|
|||
.QueryInterface(Ci.nsIFileURL);
|
||||
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
let promiseUrlListener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, promiseUrlListener);
|
||||
|
|
|
@ -81,11 +81,11 @@ async function setup() {
|
|||
var msgfileuri;
|
||||
msgfileuri = Services.io.newFileURI(gMsgFile1).QueryInterface(Ci.nsIFileURL);
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
msgfileuri = Services.io.newFileURI(gMsgFile2).QueryInterface(Ci.nsIFileURL);
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
|
|
|
@ -21,7 +21,7 @@ var gIMAPDaemon, gIMAPServer, gIMAPIncomingServer;
|
|||
// Adds some messages directly to a mailbox (eg new mail)
|
||||
function addMessageToServer(file, mailbox) {
|
||||
let URI = Services.io.newFileURI(file).QueryInterface(Ci.nsIFileURL);
|
||||
let msg = new imapMessage(URI.spec, mailbox.uidnext++, []);
|
||||
let msg = new ImapMessage(URI.spec, mailbox.uidnext++, []);
|
||||
// underestimate the actual file size, like some IMAP servers do
|
||||
msg.setSize(file.fileSize - 55);
|
||||
mailbox.addMessage(msg);
|
||||
|
@ -45,7 +45,7 @@ add_task(async function verifyContentLength() {
|
|||
Services.prefs.setIntPref("mail.imap.chunk_add", 0);
|
||||
|
||||
// set up IMAP fakeserver and incoming server
|
||||
gIMAPDaemon = new imapDaemon();
|
||||
gIMAPDaemon = new ImapDaemon();
|
||||
gIMAPServer = makeServer(gIMAPDaemon, "");
|
||||
gIMAPIncomingServer = createLocalIMAPServer(gIMAPServer.port);
|
||||
|
||||
|
|
|
@ -44,18 +44,18 @@ function addMessagesToServer(messages, mailbox) {
|
|||
let URI = Services.io
|
||||
.newFileURI(message.file)
|
||||
.QueryInterface(Ci.nsIFileURL);
|
||||
// Create the imapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new imapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
// Create the ImapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new ImapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
function addGeneratedMessagesToServer(messages, mailbox) {
|
||||
// Create the imapMessages and store them on the mailbox
|
||||
// Create the ImapMessages and store them on the mailbox
|
||||
messages.forEach(function(message) {
|
||||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(message.toMessageString())
|
||||
);
|
||||
mailbox.addMessage(new imapMessage(dataUri.spec, mailbox.uidnext++, []));
|
||||
mailbox.addMessage(new ImapMessage(dataUri.spec, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -75,9 +75,9 @@ function addMessagesToServer(aMessages, aMailbox) {
|
|||
message.spec = URI.spec;
|
||||
});
|
||||
|
||||
// Create the imapMessages and store them on the mailbox.
|
||||
// Create the ImapMessages and store them on the mailbox.
|
||||
aMessages.forEach(function(message) {
|
||||
aMailbox.addMessage(new imapMessage(message.spec, aMailbox.uidnext++, []));
|
||||
aMailbox.addMessage(new ImapMessage(message.spec, aMailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ add_task(async function setupTest() {
|
|||
);
|
||||
// Load and update a message in the imap fake server.
|
||||
|
||||
gMessage = new imapMessage(
|
||||
gMessage = new ImapMessage(
|
||||
specForFileName(gMessageFileName),
|
||||
IMAPPump.mailbox.uidnext++,
|
||||
[]
|
||||
|
|
|
@ -18,7 +18,7 @@ var { PromiseTestUtils } = ChromeUtils.import(
|
|||
var gServer, gIMAPIncomingServer, gIMAPDaemon;
|
||||
|
||||
add_task(function setupTest() {
|
||||
gIMAPDaemon = new imapDaemon();
|
||||
gIMAPDaemon = new ImapDaemon();
|
||||
// pref tuning: one connection only, turn off notifications
|
||||
Services.prefs.setIntPref("mail.server.server1.max_cached_connections", 1);
|
||||
Services.prefs.setBoolPref("mail.biff.play_sound", false);
|
||||
|
@ -53,7 +53,7 @@ add_task(async function streamMessages() {
|
|||
for (let file of do_get_file("../../../data/").directoryEntries) {
|
||||
let msgfileuri = Services.io.newFileURI(file).QueryInterface(Ci.nsIFileURL);
|
||||
if (msgfileuri.fileName.toLowerCase().startsWith("bodystructure")) {
|
||||
inbox.addMessage(new imapMessage(msgfileuri.spec, inbox.uidnext++, []));
|
||||
inbox.addMessage(new ImapMessage(msgfileuri.spec, inbox.uidnext++, []));
|
||||
fileNames.push(msgfileuri.fileName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ var { PromiseTestUtils } = ChromeUtils.import(
|
|||
);
|
||||
|
||||
add_task(function setupTest() {
|
||||
var daemon = new imapDaemon();
|
||||
var daemon = new ImapDaemon();
|
||||
daemon.createMailbox("folder 1", { subscribed: true });
|
||||
let folder1Mailbox = daemon.getMailbox("folder 1");
|
||||
folder1Mailbox.flags.push("\\Noselect");
|
||||
|
@ -126,7 +126,7 @@ function addMessageToFolder(mbox) {
|
|||
let msgURI = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messages[0].toMessageString())
|
||||
);
|
||||
let message = new imapMessage(msgURI.spec, mbox.uidnext++);
|
||||
let message = new ImapMessage(msgURI.spec, mbox.uidnext++);
|
||||
mbox.addMessage(message);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ async function setup() {
|
|||
.QueryInterface(Ci.nsIFileURL);
|
||||
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
|
||||
let messages = [];
|
||||
|
@ -38,7 +38,7 @@ async function setup() {
|
|||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messages[0].toMessageString())
|
||||
);
|
||||
let imapMsg = new imapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
let imapMsg = new ImapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
imapMsg.setSize(5000);
|
||||
IMAPPump.mailbox.addMessage(imapMsg);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ add_task(async function setupTest() {
|
|||
false
|
||||
);
|
||||
// Load and update a message in the imap fake server.
|
||||
let message = new imapMessage(
|
||||
let message = new ImapMessage(
|
||||
specForFileName(gMessage),
|
||||
IMAPPump.mailbox.uidnext++,
|
||||
[]
|
||||
|
|
|
@ -51,7 +51,7 @@ add_task(async function setupTest() {
|
|||
let msgfileuri = Services.io.newFileURI(file).QueryInterface(Ci.nsIFileURL);
|
||||
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(msgfileuri.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, listener);
|
||||
|
|
|
@ -66,7 +66,7 @@ async function runFilterAction() {
|
|||
}
|
||||
}
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, listener);
|
||||
|
|
|
@ -41,7 +41,7 @@ add_task(async function setupTest() {
|
|||
specialUseFlag: "\\AllMail",
|
||||
});
|
||||
// Load and update a message in the imap fake server.
|
||||
let message = new imapMessage(
|
||||
let message = new ImapMessage(
|
||||
specForFileName(gMessage),
|
||||
IMAPPump.mailbox.uidnext++,
|
||||
[]
|
||||
|
|
|
@ -71,7 +71,7 @@ add_task(async function setupTest() {
|
|||
fooBox = IMAPPump.daemon.getMailbox("foo");
|
||||
|
||||
// Add message1 to inbox.
|
||||
let message = new imapMessage(
|
||||
let message = new ImapMessage(
|
||||
specForFileName(gMessage1),
|
||||
IMAPPump.mailbox.uidnext++,
|
||||
[]
|
||||
|
@ -133,7 +133,7 @@ add_task(async function createAndUpdate() {
|
|||
|
||||
add_task(function addToFoo() {
|
||||
// Adding our test message.
|
||||
let message = new imapMessage(
|
||||
let message = new ImapMessage(
|
||||
specForFileName(gMessage1),
|
||||
fooBox.uidnext++,
|
||||
[]
|
||||
|
@ -144,7 +144,7 @@ add_task(function addToFoo() {
|
|||
message.xGmLabels = gXGmLabels12; // With labels excluding "foo".
|
||||
fooBox.addMessage(message);
|
||||
// Adding another message so that fooFolder behaves as LocalFolder while calculating it's size.
|
||||
let message1 = new imapMessage(
|
||||
let message1 = new ImapMessage(
|
||||
specForFileName(gMessage2),
|
||||
fooBox.uidnext++,
|
||||
[]
|
||||
|
|
|
@ -86,7 +86,7 @@ add_task(async function loadImapMessage() {
|
|||
"data:text/plain;base64," + btoa(smsg.toMessageString())
|
||||
);
|
||||
let imapInbox = IMAPPump.daemon.getMailbox("INBOX");
|
||||
let message = new imapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
let message = new ImapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(message);
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, listener);
|
||||
|
|
|
@ -82,7 +82,7 @@ function nextTest() {
|
|||
dump("NEXT test: " + thisTest.title + "\n");
|
||||
|
||||
// (re)create fake server
|
||||
var daemon = new imapDaemon();
|
||||
var daemon = new ImapDaemon();
|
||||
var server = makeServer(daemon, "", {
|
||||
kAuthSchemes: thisTest.serverAuthMethods,
|
||||
});
|
||||
|
|
|
@ -231,10 +231,10 @@ function addMessageToFolder(folder) {
|
|||
let msgURI = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messages[0].toMessageString())
|
||||
);
|
||||
let imapMailbox = IMAPPump.daemon.getMailbox(folder.name);
|
||||
let ImapMailbox = IMAPPump.daemon.getMailbox(folder.name);
|
||||
// We add messages with \Seen flag set so that we won't accidentally
|
||||
// trigger the code that updates imap folders that have unread messages moved
|
||||
// into them.
|
||||
let message = new imapMessage(msgURI.spec, imapMailbox.uidnext++, ["\\Seen"]);
|
||||
imapMailbox.addMessage(message);
|
||||
let message = new ImapMessage(msgURI.spec, ImapMailbox.uidnext++, ["\\Seen"]);
|
||||
ImapMailbox.addMessage(message);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ add_task(async function run_the_test() {
|
|||
* Set up an IMAP server. The bug is only triggered when nsMsgSaveAsListener
|
||||
* is used (i.e., for IMAP and NNTP).
|
||||
*/
|
||||
gIMAPDaemon = new imapDaemon();
|
||||
gIMAPDaemon = new ImapDaemon();
|
||||
gServer = makeServer(gIMAPDaemon, "");
|
||||
gIMAPIncomingServer = createLocalIMAPServer(gServer.port);
|
||||
|
||||
|
@ -48,7 +48,7 @@ add_task(async function run_the_test() {
|
|||
.newFileURI(gMsgFile)
|
||||
.QueryInterface(Ci.nsIFileURL);
|
||||
|
||||
let message = new imapMessage(msgfileuri.spec, inbox.uidnext++, []);
|
||||
let message = new ImapMessage(msgfileuri.spec, inbox.uidnext++, []);
|
||||
// report an artificially low size, like gmail and Exchange do
|
||||
message.setSize(gMsgFile.fileSize - 100);
|
||||
inbox.addMessage(message);
|
||||
|
|
|
@ -30,7 +30,7 @@ var gTests = [
|
|||
];
|
||||
|
||||
add_task(async function() {
|
||||
let daemon = new imapDaemon();
|
||||
let daemon = new ImapDaemon();
|
||||
server = makeServer(daemon, "", {
|
||||
// Make username of server match the singons.txt file
|
||||
// (pw there is intentionally invalid)
|
||||
|
|
|
@ -32,7 +32,7 @@ add_task(function setup() {
|
|||
add_task(async function addMessageToServer() {
|
||||
let URI = Services.io.newFileURI(gFile).QueryInterface(Ci.nsIFileURL);
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(URI.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(URI.spec, IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
|
|
|
@ -64,7 +64,7 @@ add_task(async function loadImapMessage() {
|
|||
"data:text/plain;base64," + btoa(messages[0].toMessageString())
|
||||
);
|
||||
let imapInbox = IMAPPump.daemon.getMailbox("INBOX");
|
||||
var gMessage = new imapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
var gMessage = new ImapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(gMessage);
|
||||
|
||||
let promiseUrlListener = new PromiseTestUtils.PromiseUrlListener();
|
||||
|
|
|
@ -422,7 +422,7 @@ async function setupTest(aFilter, aAction) {
|
|||
gInboxListener = new DBListener();
|
||||
gDbService.registerPendingListener(IMAPPump.inbox, gInboxListener);
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
let promiseUrlListener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, promiseUrlListener);
|
||||
|
|
|
@ -226,7 +226,7 @@ async function setupTest(aFilter, aAction) {
|
|||
gInboxListener = new DBListener();
|
||||
gDbService.registerPendingListener(IMAPPump.inbox, gInboxListener);
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
let promiseUrlListener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, promiseUrlListener);
|
||||
|
|
|
@ -37,7 +37,7 @@ add_task(async function setupTest() {
|
|||
let msgURI = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(gSynthMessage.toMessageString())
|
||||
);
|
||||
gMessage = new imapMessage(msgURI.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
gMessage = new ImapMessage(msgURI.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(gMessage);
|
||||
|
||||
// update folder to download header.
|
||||
|
|
|
@ -101,13 +101,13 @@ add_task(async function uploadImapMessages() {
|
|||
|
||||
// Add OVERALL_MESSAGES messages with uids 1,2,3...,OVERALL_MESSAGES.
|
||||
let imapInbox = IMAPPump.daemon.getMailbox("INBOX");
|
||||
// Create the imapMessages and store them on the mailbox.
|
||||
// Create the ImapMessages and store them on the mailbox.
|
||||
messages.forEach(function(message) {
|
||||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(message.toMessageString())
|
||||
);
|
||||
imapInbox.addMessage(
|
||||
new imapMessage(dataUri.spec, imapInbox.uidnext++, [])
|
||||
new ImapMessage(dataUri.spec, imapInbox.uidnext++, [])
|
||||
);
|
||||
});
|
||||
// Do not wait for the listener to finish.
|
||||
|
|
|
@ -32,8 +32,8 @@ function addMessagesToServer(messages, mailbox) {
|
|||
let URI = Services.io
|
||||
.newFileURI(message.file)
|
||||
.QueryInterface(Ci.nsIFileURL);
|
||||
// Create the imapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new imapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
// Create the ImapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new ImapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@ var gFolder1, gRootFolder;
|
|||
|
||||
// Adds some messages directly to a mailbox (eg new mail)
|
||||
function addMessagesToServer(messages, mailbox) {
|
||||
// Create the imapMessages and store them on the mailbox
|
||||
// Create the ImapMessages and store them on the mailbox
|
||||
messages.forEach(function(message) {
|
||||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(message.toMessageString())
|
||||
);
|
||||
mailbox.addMessage(new imapMessage(dataUri.spec, mailbox.uidnext++, []));
|
||||
mailbox.addMessage(new ImapMessage(dataUri.spec, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ add_task(function setupTest() {
|
|||
/*
|
||||
* Set up an IMAP server.
|
||||
*/
|
||||
gIMAPDaemon = new imapDaemon();
|
||||
gIMAPDaemon = new ImapDaemon();
|
||||
gServer = makeServer(gIMAPDaemon, "");
|
||||
gIMAPDaemon.createMailbox("folder 1", { subscribed: true });
|
||||
gIMAPIncomingServer = createLocalIMAPServer(gServer.port);
|
||||
|
|
|
@ -80,7 +80,7 @@ add_task(async function() {
|
|||
|
||||
registerAlertTestUtils();
|
||||
|
||||
let daemon = new imapDaemon();
|
||||
let daemon = new ImapDaemon();
|
||||
daemon.createMailbox("Subscribed", { subscribed: true });
|
||||
server = makeServer(daemon, "", {
|
||||
// Make username of server match the singons.txt file
|
||||
|
|
|
@ -22,7 +22,7 @@ add_task(async function setup() {
|
|||
Services.prefs.setBoolPref("mail.biff.show_tray_icon", false);
|
||||
Services.prefs.setBoolPref("mail.biff.animate_dock_icon", false);
|
||||
|
||||
daemon = new imapDaemon();
|
||||
daemon = new ImapDaemon();
|
||||
server = makeServer(daemon, "");
|
||||
|
||||
let messages = [];
|
||||
|
@ -31,7 +31,7 @@ add_task(async function setup() {
|
|||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messages[0].toMessageString())
|
||||
);
|
||||
let imapMsg = new imapMessage(dataUri.spec, daemon.inbox.uidnext++, []);
|
||||
let imapMsg = new ImapMessage(dataUri.spec, daemon.inbox.uidnext++, []);
|
||||
daemon.inbox.addMessage(imapMsg);
|
||||
|
||||
NetworkTestUtils.configureProxy("imap.tinderbox.invalid", PORT, server.port);
|
||||
|
|
|
@ -295,7 +295,7 @@ add_task(async function setupTest() {
|
|||
|
||||
// Load imap message.
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, listener);
|
||||
|
|
|
@ -39,8 +39,8 @@ function addMessagesToServer(messages, mailbox) {
|
|||
let URI = Services.io
|
||||
.newFileURI(message.file)
|
||||
.QueryInterface(Ci.nsIFileURL);
|
||||
// Create the imapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new imapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
// Create the ImapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new ImapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ add_task(async function addNewMsgs() {
|
|||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(message.toMessageString())
|
||||
);
|
||||
mbox.addMessage(new imapMessage(dataUri.spec, mbox.uidnext++, []));
|
||||
mbox.addMessage(new ImapMessage(dataUri.spec, mbox.uidnext++, []));
|
||||
});
|
||||
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
|
|
|
@ -41,8 +41,8 @@ function addMessagesToServer(messages, mailbox) {
|
|||
let URI = Services.io
|
||||
.newFileURI(message.file)
|
||||
.QueryInterface(Ci.nsIFileURL);
|
||||
// Create the imapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new imapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
// Create the ImapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new ImapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -66,13 +66,13 @@ add_task(async function addOfflineMessages() {
|
|||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messages[0].toMessageString())
|
||||
);
|
||||
let imapMsg = new imapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
let imapMsg = new ImapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(imapMsg);
|
||||
|
||||
dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messages[1].toMessageString())
|
||||
);
|
||||
imapMsg = new imapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
imapMsg = new ImapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(imapMsg);
|
||||
|
||||
// Extend local IMAP inbox to over 4 GiB.
|
||||
|
|
|
@ -129,8 +129,8 @@ function addMessagesToServer(messages, mailbox, localFolder) {
|
|||
let URI = Services.io
|
||||
.newFileURI(message.file)
|
||||
.QueryInterface(Ci.nsIFileURL);
|
||||
// Create the imapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new imapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
// Create the ImapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new ImapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
// We can't get the headers again, so just pass on the message id
|
||||
gExpectedEvents.push([
|
||||
MailServices.mfn.msgAdded,
|
||||
|
@ -264,7 +264,7 @@ function run_test() {
|
|||
// This is before any of the actual tests, so...
|
||||
gTest = 0;
|
||||
|
||||
gIMAPDaemon = new imapDaemon();
|
||||
gIMAPDaemon = new ImapDaemon();
|
||||
gServer = makeServer(gIMAPDaemon, "");
|
||||
|
||||
gIMAPIncomingServer = createLocalIMAPServer(gServer.port);
|
||||
|
|
|
@ -36,8 +36,8 @@ function addMessagesToServer(messages, mailbox) {
|
|||
let URI = Services.io
|
||||
.newFileURI(message.file)
|
||||
.QueryInterface(Ci.nsIFileURL);
|
||||
// Create the imapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new imapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
// Create the ImapMessage and store it on the mailbox.
|
||||
mailbox.addMessage(new ImapMessage(URI.spec, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -163,12 +163,12 @@ async function setup() {
|
|||
"data:text/plain;base64," + btoa(messages[0].toMessageString())
|
||||
);
|
||||
let imapInbox = IMAPPump.daemon.getMailbox("INBOX");
|
||||
let message = new imapMessage(msgURI.spec, imapInbox.uidnext++, ["\\Seen"]);
|
||||
let message = new ImapMessage(msgURI.spec, imapInbox.uidnext++, ["\\Seen"]);
|
||||
imapInbox.addMessage(message);
|
||||
msgURI = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messages[1].toMessageString())
|
||||
);
|
||||
message = new imapMessage(msgURI.spec, imapInbox.uidnext++, ["\\Seen"]);
|
||||
message = new ImapMessage(msgURI.spec, imapInbox.uidnext++, ["\\Seen"]);
|
||||
imapInbox.addMessage(message);
|
||||
|
||||
// update folder to download header.
|
||||
|
|
|
@ -36,12 +36,12 @@ function alert(aDialogTitle, aText) {
|
|||
}
|
||||
|
||||
function addGeneratedMessagesToServer(messages, mailbox) {
|
||||
// Create the imapMessages and store them on the mailbox
|
||||
// Create the ImapMessages and store them on the mailbox
|
||||
messages.forEach(function(message) {
|
||||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(message.toMessageString())
|
||||
);
|
||||
mailbox.addMessage(new imapMessage(dataUri.spec, mailbox.uidnext++, []));
|
||||
mailbox.addMessage(new ImapMessage(dataUri.spec, mailbox.uidnext++, []));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -39,14 +39,14 @@ add_task(async function loadImapMessage() {
|
|||
let msgURI = Services.io.newFileURI(file).QueryInterface(Ci.nsIFileURL);
|
||||
|
||||
let imapInbox = IMAPPump.daemon.getMailbox("INBOX");
|
||||
let message = new imapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
let message = new ImapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(message);
|
||||
// add a second message with no external parts. We want to make
|
||||
// sure that streaming this message doesn't mark it read, even
|
||||
// though we will fallback to fetching the whole message.
|
||||
file = do_get_file("../../../data/bodystructuretest3");
|
||||
msgURI = Services.io.newFileURI(file).QueryInterface(Ci.nsIFileURL);
|
||||
message = new imapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
message = new ImapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(message);
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, listener);
|
||||
|
|
|
@ -36,7 +36,7 @@ add_task(async function createSubfolder() {
|
|||
// load and update a message in the imap fake server
|
||||
add_task(async function loadImapMessage() {
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
IMAPPump.inbox.updateFolder(null);
|
||||
await PromiseTestUtils.promiseFolderNotification(IMAPPump.inbox, "msgAdded");
|
||||
|
|
|
@ -36,7 +36,7 @@ add_task(async function loadImapMessage() {
|
|||
"data:text/plain;base64," + btoa(smsg.toMessageString())
|
||||
);
|
||||
let imapInbox = IMAPPump.daemon.getMailbox("INBOX");
|
||||
let message = new imapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
let message = new ImapMessage(msgURI.spec, imapInbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(message);
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(null, listener);
|
||||
|
|
|
@ -30,7 +30,7 @@ function alert(aDialogTitle, aText) {
|
|||
|
||||
add_task(async function setupTest() {
|
||||
// Set up IMAP fakeserver and incoming server.
|
||||
IMAPPump.daemon = new imapDaemon();
|
||||
IMAPPump.daemon = new ImapDaemon();
|
||||
IMAPPump.server = makeServer(IMAPPump.daemon, "", { dropOnStartTLS: true });
|
||||
IMAPPump.incomingServer = createLocalIMAPServer(IMAPPump.server.port);
|
||||
IMAPPump.incomingServer.socketType = Ci.nsMsgSocketType.alwaysSTARTTLS;
|
||||
|
|
|
@ -39,7 +39,7 @@ add_task(async function setup_messages() {
|
|||
let dataUri = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(messageString)
|
||||
);
|
||||
let imapMsg = new imapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
let imapMsg = new ImapMessage(dataUri.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(imapMsg);
|
||||
|
||||
let listener = new PromiseTestUtils.PromiseUrlListener();
|
||||
|
|
|
@ -25,7 +25,7 @@ add_task(function() {
|
|||
// load and update a message in the imap fake server
|
||||
add_task(async function loadImapMessage() {
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
let promiseUrlListener = new PromiseTestUtils.PromiseUrlListener();
|
||||
IMAPPump.inbox.updateFolderWithListener(gDummyMsgWindow, promiseUrlListener);
|
||||
|
|
|
@ -35,7 +35,7 @@ add_task(async function setupTest() {
|
|||
let msgURI = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(gSynthMessage.toMessageString())
|
||||
);
|
||||
gMessage = new imapMessage(msgURI.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
gMessage = new ImapMessage(msgURI.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(gMessage);
|
||||
|
||||
// update folder to download header.
|
||||
|
|
|
@ -59,7 +59,7 @@ add_task(async function createJunkFolder() {
|
|||
*/
|
||||
add_task(async function loadImapMessage() {
|
||||
IMAPPump.mailbox.addMessage(
|
||||
new imapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
new ImapMessage(specForFileName(gMessage), IMAPPump.mailbox.uidnext++, [])
|
||||
);
|
||||
/*
|
||||
* The message matched the SpamAssassin header, so it moved
|
||||
|
|
|
@ -14,7 +14,7 @@ load("../../../resources/MessageGenerator.jsm");
|
|||
var { IMAPPump, setupIMAPPump, teardownIMAPPump } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/IMAPpump.jsm"
|
||||
);
|
||||
var { imapMessage } = ChromeUtils.import(
|
||||
var { ImapMessage } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/Imapd.jsm"
|
||||
);
|
||||
const { PromiseTestUtils } = ChromeUtils.import(
|
||||
|
@ -31,7 +31,7 @@ async function setupFolder() {
|
|||
let msgURI = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(synthMessage.toMessageString())
|
||||
);
|
||||
let message = new imapMessage(msgURI.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
let message = new ImapMessage(msgURI.spec, IMAPPump.mailbox.uidnext++, []);
|
||||
IMAPPump.mailbox.addMessage(message);
|
||||
|
||||
// update folder to download header.
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
// This file implements test IMAP servers
|
||||
|
||||
var EXPORTED_SYMBOLS = [
|
||||
"imapDaemon",
|
||||
"imapMailbox",
|
||||
"imapMessage",
|
||||
"ImapDaemon",
|
||||
"ImapMailbox",
|
||||
"ImapMessage",
|
||||
"IMAP_RFC3501_handler",
|
||||
"configurations",
|
||||
"mixinExtension",
|
||||
|
@ -37,7 +37,7 @@ var EXPORTED_SYMBOLS = [
|
|||
// DAEMON
|
||||
// + Namespaces: parentless mailboxes whose names are the namespace name. The
|
||||
// type of the namespace is specified by the type attribute.
|
||||
// + Mailboxes: imapMailbox objects with several properties. If a mailbox
|
||||
// + Mailboxes: ImapMailbox objects with several properties. If a mailbox
|
||||
// | | property begins with a '_', then it should not be serialized because
|
||||
// | | it can be discovered from other means; in particular, a '_' does not
|
||||
// | | necessarily mean that it is a private property that should not be
|
||||
|
@ -66,15 +66,15 @@ var { AuthPLAIN, AuthLOGIN, AuthCRAM } = ChromeUtils.import(
|
|||
"resource://testing-common/mailnews/Auth.jsm"
|
||||
);
|
||||
|
||||
class imapDaemon {
|
||||
class ImapDaemon {
|
||||
constructor(flags, syncFunc) {
|
||||
this._flags = flags;
|
||||
|
||||
this.namespaces = [];
|
||||
this.idResponse = "NIL";
|
||||
this.root = new imapMailbox("", null, { type: IMAP_NAMESPACE_PERSONAL });
|
||||
this.root = new ImapMailbox("", null, { type: IMAP_NAMESPACE_PERSONAL });
|
||||
this.uidvalidity = Math.round(Date.now() / 1000);
|
||||
this.inbox = new imapMailbox("INBOX", null, this.uidvalidity++);
|
||||
this.inbox = new ImapMailbox("INBOX", null, this.uidvalidity++);
|
||||
this.root.addMailbox(this.inbox);
|
||||
this.namespaces.push(this.root);
|
||||
this.syncFunc = syncFunc;
|
||||
|
@ -176,18 +176,18 @@ class imapDaemon {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
// If this is an imapMailbox...
|
||||
// If this is an ImapMailbox...
|
||||
if (oldBox && oldBox._children) {
|
||||
// Only delete now so we don't screw ourselves up if creation fails
|
||||
this.deleteMailbox(oldBox);
|
||||
oldBox._parent = box == this.root ? null : box;
|
||||
let newBox = new imapMailbox(subName, box, this.uidvalidity++);
|
||||
let newBox = new ImapMailbox(subName, box, this.uidvalidity++);
|
||||
newBox._messages = oldBox._messages;
|
||||
box.addMailbox(newBox);
|
||||
|
||||
// And if oldBox is an INBOX, we need to recreate that
|
||||
if (oldBox.name == "INBOX") {
|
||||
this.inbox = new imapMailbox("INBOX", null, this.uidvalidity++);
|
||||
this.inbox = new ImapMailbox("INBOX", null, this.uidvalidity++);
|
||||
this.root.addMailbox(this.inbox);
|
||||
}
|
||||
oldBox.name = subName;
|
||||
|
@ -195,7 +195,7 @@ class imapDaemon {
|
|||
// oldBox is a regular {} object, so it contains mailbox data but is not
|
||||
// a mailbox itself. Pass it into the constructor and let that deal with
|
||||
// it...
|
||||
let childBox = new imapMailbox(
|
||||
let childBox = new ImapMailbox(
|
||||
subName,
|
||||
box == this.root ? null : box,
|
||||
oldBox
|
||||
|
@ -208,7 +208,7 @@ class imapDaemon {
|
|||
var creatable = hasFlag(this._flags, IMAP_FLAG_NEEDS_DELIMITER)
|
||||
? name[name.length - 1] == namespace.delimiter
|
||||
: true;
|
||||
let childBox = new imapMailbox(subName, box == this.root ? null : box, {
|
||||
let childBox = new ImapMailbox(subName, box == this.root ? null : box, {
|
||||
flags: creatable ? [] : ["\\NoInferiors"],
|
||||
uidvalidity: this.uidvalidity++,
|
||||
});
|
||||
|
@ -229,7 +229,7 @@ class imapDaemon {
|
|||
}
|
||||
}
|
||||
|
||||
class imapMailbox {
|
||||
class ImapMailbox {
|
||||
constructor(name, parent, state) {
|
||||
this.name = name;
|
||||
this._parent = parent;
|
||||
|
@ -391,7 +391,7 @@ class imapMailbox {
|
|||
}
|
||||
}
|
||||
|
||||
class imapMessage {
|
||||
class ImapMessage {
|
||||
constructor(URI, uid, flags) {
|
||||
this._URI = URI;
|
||||
this.uid = uid;
|
||||
|
@ -1374,7 +1374,7 @@ class IMAP_RFC3501_handler {
|
|||
date = Date.now();
|
||||
text = args[1];
|
||||
}
|
||||
var msg = new imapMessage(
|
||||
var msg = new ImapMessage(
|
||||
"data:text/plain," + encodeURI(text),
|
||||
mailbox.uidnext++,
|
||||
flags
|
||||
|
@ -1538,7 +1538,7 @@ class IMAP_RFC3501_handler {
|
|||
}
|
||||
|
||||
for (var message of messages) {
|
||||
let newMessage = new imapMessage(
|
||||
let newMessage = new ImapMessage(
|
||||
message._URI,
|
||||
dest.uidnext++,
|
||||
message.flags
|
||||
|
@ -1742,7 +1742,7 @@ class IMAP_RFC3501_handler {
|
|||
// body), and an array of arguments if we have a subquery. If we made an
|
||||
// error here, it will pop until it gets to FETCH, which will just pop at a
|
||||
// BAD response, which is what should happen if the query is malformed.
|
||||
// Now we dump it all off onto imapMessage to mess with.
|
||||
// Now we dump it all off onto ImapMessage to mess with.
|
||||
|
||||
// Start off the response
|
||||
let response = "BODY[" + parts[1] + "]";
|
||||
|
@ -2063,7 +2063,7 @@ var IMAP_MOVE_extension = {
|
|||
}
|
||||
|
||||
for (var message of messages) {
|
||||
let newMessage = new imapMessage(
|
||||
let newMessage = new ImapMessage(
|
||||
message._URI,
|
||||
dest.uidnext++,
|
||||
message.flags
|
||||
|
|
|
@ -77,7 +77,7 @@ function setupIMAPPump(extensions) {
|
|||
|
||||
// end copy from head_server.js
|
||||
|
||||
IMAPPump.daemon = new Imapd.imapDaemon();
|
||||
IMAPPump.daemon = new Imapd.ImapDaemon();
|
||||
IMAPPump.server = makeServer(IMAPPump.daemon, extensions);
|
||||
|
||||
IMAPPump.incomingServer = createLocalIMAPServer();
|
||||
|
|
|
@ -20,7 +20,7 @@ var { PromiseTestUtils } = ChromeUtils.import(
|
|||
var { VirtualFolderHelper } = ChromeUtils.import(
|
||||
"resource:///modules/VirtualFolderWrapper.jsm"
|
||||
);
|
||||
var { imapMessage } = ChromeUtils.import(
|
||||
var { ImapMessage } = ChromeUtils.import(
|
||||
"resource://testing-common/mailnews/Imapd.jsm"
|
||||
);
|
||||
var { IMAPPump, setupIMAPPump } = ChromeUtils.import(
|
||||
|
@ -726,7 +726,7 @@ class MessageInjection {
|
|||
let msgURI = Services.io.newURI(
|
||||
"data:text/plain;base64," + btoa(synMsg.toMessageString())
|
||||
);
|
||||
let imapMsg = new imapMessage(
|
||||
let imapMsg = new ImapMessage(
|
||||
msgURI.spec,
|
||||
fakeFolder.uidnext++,
|
||||
[]
|
||||
|
|
Загрузка…
Ссылка в новой задаче