Bug 1510571 - clean up some includes of nsMsgMessageFlags.h and use of Ci.nsMsgMessageFlags. r=jorgk
This commit is contained in:
Родитель
22360aa5a9
Коммит
2e99d5678a
|
@ -23,7 +23,6 @@ var {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
|||
var {IOUtils} = ChromeUtils.import("resource:///modules/IOUtils.js");
|
||||
|
||||
var statusHeader = "X-Mozilla-Status: ";
|
||||
var nsMsgMessageFlags = Ci.nsMsgMessageFlags;
|
||||
|
||||
var gInbox;
|
||||
var gOutbox;
|
||||
|
@ -111,7 +110,7 @@ function test_mark_messages_read() {
|
|||
press_delete(mc);
|
||||
assert_not_equals(curMessage, select_click_row(0));
|
||||
check_status(null, offset, statusOffset,
|
||||
nsMsgMessageFlags.Read + nsMsgMessageFlags.Expunged);
|
||||
Ci.nsMsgMessageFlags.Read + Ci.nsMsgMessageFlags.Expunged);
|
||||
|
||||
// 4 messages in the folder.
|
||||
curMessage = select_click_row(0);
|
||||
|
@ -124,16 +123,16 @@ function test_mark_messages_read() {
|
|||
|
||||
// All the 4 messages should now be read.
|
||||
assert_true(curMessage.isRead, "Message should have been marked Read!");
|
||||
check_status(curMessage, null, null, nsMsgMessageFlags.Read);
|
||||
check_status(curMessage, null, null, Ci.nsMsgMessageFlags.Read);
|
||||
curMessage = select_click_row(1);
|
||||
assert_true(curMessage.isRead, "Message should have been marked Read!");
|
||||
check_status(curMessage, null, null, nsMsgMessageFlags.Read);
|
||||
check_status(curMessage, null, null, Ci.nsMsgMessageFlags.Read);
|
||||
curMessage = select_click_row(2);
|
||||
assert_true(curMessage.isRead, "Message should have been marked Read!");
|
||||
check_status(curMessage, null, null, nsMsgMessageFlags.Read);
|
||||
check_status(curMessage, null, null, Ci.nsMsgMessageFlags.Read);
|
||||
curMessage = select_click_row(3);
|
||||
assert_true(curMessage.isRead, "Message should have been marked Read!");
|
||||
check_status(curMessage, null, null, nsMsgMessageFlags.Read);
|
||||
check_status(curMessage, null, null, Ci.nsMsgMessageFlags.Read);
|
||||
|
||||
// Let's have the last message unread.
|
||||
right_click_on_row(3);
|
||||
|
@ -150,7 +149,7 @@ function test_mark_messages_flagged() {
|
|||
mc.click_menus_in_sequence(mc.e("mailContext"), [{id: "mailContext-mark"},
|
||||
{id: "mailContext-markFlagged"}]);
|
||||
assert_true(curMessage.isFlagged, "Message should have been marked Flagged!");
|
||||
check_status(curMessage, null, null, nsMsgMessageFlags.Read + nsMsgMessageFlags.Marked);
|
||||
check_status(curMessage, null, null, Ci.nsMsgMessageFlags.Read + Ci.nsMsgMessageFlags.Marked);
|
||||
}
|
||||
|
||||
function subtest_check_queued_message() {
|
||||
|
@ -160,7 +159,7 @@ function subtest_check_queued_message() {
|
|||
while (queued.hasMoreElements()) {
|
||||
let msg = queued.getNext().QueryInterface(Ci.nsIMsgDBHdr);
|
||||
if (!queued.hasMoreElements()) {
|
||||
check_status(msg, null, null, nsMsgMessageFlags.Queued);
|
||||
check_status(msg, null, null, Ci.nsMsgMessageFlags.Queued);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -210,7 +209,7 @@ function test_mark_messages_replied() {
|
|||
reply_forward_message(2, true);
|
||||
let curMessage = select_click_row(2);
|
||||
check_status(curMessage, null, null,
|
||||
nsMsgMessageFlags.Replied + nsMsgMessageFlags.Read);
|
||||
Ci.nsMsgMessageFlags.Replied + Ci.nsMsgMessageFlags.Read);
|
||||
}
|
||||
|
||||
function test_mark_messages_forwarded() {
|
||||
|
@ -218,14 +217,14 @@ function test_mark_messages_forwarded() {
|
|||
// Forward a clean message.
|
||||
reply_forward_message(3, false);
|
||||
let curMessage = select_click_row(3);
|
||||
check_status(curMessage, null, null, nsMsgMessageFlags.Forwarded);
|
||||
check_status(curMessage, null, null, Ci.nsMsgMessageFlags.Forwarded);
|
||||
|
||||
// Forward a message that is read and already replied to.
|
||||
reply_forward_message(2, false);
|
||||
curMessage = select_click_row(2);
|
||||
check_status(curMessage, null, null,
|
||||
nsMsgMessageFlags.Forwarded + nsMsgMessageFlags.Replied +
|
||||
nsMsgMessageFlags.Read);
|
||||
Ci.nsMsgMessageFlags.Forwarded + Ci.nsMsgMessageFlags.Replied +
|
||||
Ci.nsMsgMessageFlags.Read);
|
||||
}
|
||||
|
||||
function teardownModule(module) {
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "nsIMsgAttachment.h"
|
||||
#include "nsIMsgProgress.h"
|
||||
#include "nsMsgFolderFlags.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsIMsgDatabase.h"
|
||||
#include "nsStringStream.h"
|
||||
#include "nsIMutableArray.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "nsMsgBaseCID.h"
|
||||
#include "nsMsgFolderFlags.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsIMsgFolder.h"
|
||||
#include "nsIMsgAccountManager.h"
|
||||
#include "nsIMsgFolder.h"
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
#include "nsIMsgMessageService.h"
|
||||
#include "nsIMsgHdr.h"
|
||||
#include "nsIMsgFolder.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsComposeStrings.h"
|
||||
#include "nsString.h"
|
||||
#include "nsMsgUtils.h"
|
||||
|
|
|
@ -113,7 +113,6 @@
|
|||
#include "msgCore.h"
|
||||
#include "prprf.h"
|
||||
#include "nsIOutputStream.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsMsgAttachmentHandler.h"
|
||||
#include "nsMsgCompFields.h"
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "nsIObserverService.h"
|
||||
#include "nsIMsgLocalMailFolder.h"
|
||||
#include "nsIMsgDatabase.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "nsArrayUtils.h"
|
||||
|
||||
|
|
|
@ -19,10 +19,6 @@ const {Gloda} = ChromeUtils.import("resource:///modules/gloda/gloda.js");
|
|||
const {TagNoun} = ChromeUtils.import("resource:///modules/gloda/noun_tag.js");
|
||||
const {MailServices} = ChromeUtils.import("resource:///modules/MailServices.jsm");
|
||||
|
||||
|
||||
var nsMsgMessageFlags_Replied = Ci.nsMsgMessageFlags.Replied;
|
||||
var nsMsgMessageFlags_Forwarded = Ci.nsMsgMessageFlags.Forwarded;
|
||||
|
||||
var EXT_BUILTIN = "built-in";
|
||||
|
||||
/**
|
||||
|
@ -140,8 +136,8 @@ var GlodaExplicitAttr = {
|
|||
aGlodaMessage.read = aMsgHdr.isRead;
|
||||
|
||||
let flags = aMsgHdr.flags;
|
||||
aGlodaMessage.repliedTo = Boolean(flags & nsMsgMessageFlags_Replied);
|
||||
aGlodaMessage.forwarded = Boolean(flags & nsMsgMessageFlags_Forwarded);
|
||||
aGlodaMessage.repliedTo = Boolean(flags & Ci.nsMsgMessageFlags.Replied);
|
||||
aGlodaMessage.forwarded = Boolean(flags & Ci.nsMsgMessageFlags.Forwarded);
|
||||
|
||||
let tags = aGlodaMessage.tags = [];
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsMsgDatabase.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
#include "nsIDBChangeListener.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "msgCore.h"
|
||||
#include "nsImapMailDatabase.h"
|
||||
#include "nsDBFolderInfo.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
|
||||
const char *kPendingHdrsScope =
|
||||
"ns:msg:db:row:scope:pending:all"; // scope for all offine ops table
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "nsMsgHdr.h"
|
||||
#include "nsMsgDatabase.h"
|
||||
#include "nsMsgUtils.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsIMsgThread.h"
|
||||
#include "nsMsgMimeCID.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "nsMsgDatabase.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsMsgThread.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsSimpleEnumerator.h"
|
||||
#include "MailNewsTypes2.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "nsIMsgThread.h"
|
||||
#include "nsNewsDatabase.h"
|
||||
#include "nsMsgKeySet.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "prlog.h"
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "nsImapOfflineSync.h"
|
||||
#include "nsImapMailFolder.h"
|
||||
#include "nsMsgFolderFlags.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsMsgBaseCID.h"
|
||||
#include "nsIMsgMailNewsUrl.h"
|
||||
#include "nsIMsgAccountManager.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "msgCore.h"
|
||||
#include "nsImapProtocol.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
|
||||
struct msgState {
|
||||
uint32_t uid;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "nsCOMPtr.h"
|
||||
#include "msgCore.h"
|
||||
#include "nsImapProtocol.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
|
||||
// What to check
|
||||
enum EHdrArrayCheck
|
||||
|
|
|
@ -40,8 +40,6 @@ var gXGmMsgid2 = "1278455345230334555";
|
|||
var gXGmThrid2 = "1266894639832287111";
|
||||
var gXGmLabels2 = '(\"\\\\Sent\")';
|
||||
|
||||
var nsMsgMessageFlags = Ci.nsMsgMessageFlags;
|
||||
|
||||
var fooBox;
|
||||
var fooFolder;
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@ load("../../../resources/messageInjection.js");
|
|||
setupIMAPPump();
|
||||
|
||||
|
||||
var nsMsgMessageFlags = Ci.nsMsgMessageFlags;
|
||||
|
||||
var gMsgFile1 = do_get_file("../../../data/bugmail10");
|
||||
var gMsgId1 = "200806061706.m56H6RWT004933@mrapp54.mozilla.org";
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ load("../../../resources/messageInjection.js");
|
|||
var gMessageGenerator = new MessageGenerator();
|
||||
var gScenarioFactory = new MessageScenarioFactory(gMessageGenerator);
|
||||
|
||||
var nsMsgMessageFlags = Ci.nsMsgMessageFlags;
|
||||
|
||||
var gMsgFile1 = do_get_file("../../../data/bugmail10");
|
||||
var gMsgId1 = "200806061706.m56H6RWT004933@mrapp54.mozilla.org";
|
||||
var gMsgFile2 = do_get_file("../../../data/image-attach-test");
|
||||
|
@ -127,7 +125,7 @@ var tests = [
|
|||
},
|
||||
function* select2ndMsg() {
|
||||
let msg1 = IMAPPump.inbox.msgDatabase.getMsgHdrForMessageID(gMsgId1);
|
||||
Assert.notEqual(msg1.flags & nsMsgMessageFlags.Offline, 0);
|
||||
Assert.notEqual(msg1.flags & Ci.nsMsgMessageFlags.Offline, 0);
|
||||
let db = IMAPPump.inbox.msgDatabase;
|
||||
let msg2 = db.getMsgHdrForMessageID(gMsgId2);
|
||||
let url = new Object;
|
||||
|
@ -141,7 +139,7 @@ var tests = [
|
|||
},
|
||||
function* select3rdMsg() {
|
||||
let msg2 = IMAPPump.inbox.msgDatabase.getMsgHdrForMessageID(gMsgId2);
|
||||
Assert.notEqual(msg2.flags & nsMsgMessageFlags.Offline, 0);
|
||||
Assert.notEqual(msg2.flags & Ci.nsMsgMessageFlags.Offline, 0);
|
||||
let db = IMAPPump.inbox.msgDatabase;
|
||||
let msg3 = db.getMsgHdrForMessageID(gMsgId3);
|
||||
let url = new Object;
|
||||
|
@ -156,7 +154,7 @@ var tests = [
|
|||
function verify3rdMsg() {
|
||||
let msg3 = IMAPPump.inbox.msgDatabase.getMsgHdrForMessageID(gMsgId3);
|
||||
// can't turn this on because our fake server doesn't support body structure.
|
||||
// do_check_eq(msg3.flags & nsMsgMessageFlags.Offline, 0);
|
||||
// do_check_eq(msg3.flags & Ci.nsMsgMessageFlags.Offline, 0);
|
||||
},
|
||||
function* addNewMsgs() {
|
||||
let mbox = IMAPPump.daemon.getMailbox("INBOX")
|
||||
|
|
|
@ -16,8 +16,6 @@ var {PromiseTestUtils} = ChromeUtils.import("resource://testing-common/mailnews/
|
|||
|
||||
load("../../../resources/logHelper.js");
|
||||
|
||||
var nsMsgMessageFlags = Ci.nsMsgMessageFlags;
|
||||
|
||||
var gMsgFile1 = do_get_file("../../../data/bugmail10");
|
||||
var gMsgId1 = "200806061706.m56H6RWT004933@mrapp54.mozilla.org";
|
||||
var gMsgFile2 = do_get_file("../../../data/image-attach-test");
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "nsIMsgMailNewsUrl.h"
|
||||
#include "nsIMsgFolder.h"
|
||||
#include "nsICopyMsgStreamListener.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "prtime.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/SlicedInputStream.h"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "nsMsgBrkMBoxStore.h"
|
||||
#include "nsIMsgFolder.h"
|
||||
#include "nsMsgFolderFlags.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsIMsgLocalMailFolder.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsIFile.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "nsLocalUtils.h"
|
||||
#include "nsMsgLocalFolderHdrs.h"
|
||||
#include "nsIMsgFolder.h" // TO include biffState enum. Change to bool later...
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsMailHeaders.h"
|
||||
#include "nsIMsgAccountManager.h"
|
||||
#include "nsIPop3Protocol.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "plstr.h"
|
||||
#include "mimebuf.h"
|
||||
#include "mimemoz2.h"
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "comi18n.h"
|
||||
#include "nsMailHeaders.h"
|
||||
#include "msgCore.h"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "nsMsgUtils.h"
|
||||
|
||||
#include "nsMsgDatabase.h"
|
||||
|
||||
#include "nsMsgMessageFlags.h"
|
||||
#include "nsIDBFolderInfo.h"
|
||||
|
||||
#include "nsNewsUtils.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче