Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 766380 - test_imapHdrChunking.js should use nsIFolderListener instead of nsIMsgFolderListener and nsIStreamListener.
: test_imapHdrChunking.js should use nsIFolderListener instead of nsIMsgFolderL...
Product: MailNews Core
Classification: Components
Component: Testing Infrastructure (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 16.0
Assigned To: Hiroyuki Ikezoe (:hiro)
Depends on:
Blocks: 766467
  Show dependency treegraph
Reported: 2012-06-19 16:26 PDT by Hiroyuki Ikezoe (:hiro)
Modified: 2012-06-27 16:59 PDT (History)
3 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Fix (5.02 KB, patch)
2012-06-19 16:28 PDT, Hiroyuki Ikezoe (:hiro)
mozilla: review+
Details | Diff | Splinter Review

Description Hiroyuki Ikezoe (:hiro) 2012-06-19 16:26:52 PDT
test_imapHdrChunking.js is fragile. 

--- a/mailnews/base/src/nsMessengerUnixIntegration.cpp
+++ b/mailnews/base/src/nsMessengerUnixIntegration.cpp
@@ -499,26 +499,27 @@ void nsMessengerUnixIntegration::FillToo
     nsCOMPtr<nsIStringBundle> bundle;
     if (!bundle)
+#if 0
     // Create the notification title
     nsString alertTitle;
     if (!BuildNotificationTitle(folder, bundle, alertTitle))
     // Let's get the new mail for this folder
     nsCOMPtr<nsIMsgDatabase> db;
     if (NS_FAILED(folderWithNewMail->GetMsgDatabase(getter_AddRefs(db))))
     PRUint32 numNewKeys = 0;
     PRUint32 *newMessageKeys;
     db->GetNewList(&numNewKeys, &newMessageKeys);
     // If we had new messages, we *should* have new keys, but we'll
     // check just in case.
     if (numNewKeys <= 0) {

With this change, test_imapHdrChunking.js fails:

TEST-UNEXPECTED-FAIL | /home/zoe/hg/comm-central/objdir-thunderbird/mozilla/_tests/xpcshell/mailnews/imap/test/unit/test_imapHdrChunking.js | 9 == 3 - See following stack:

because receiving onStopRequest is too late, I guess main loop spins twice in this case.

updateFolderWithListener with null argument for nsIMsgWindow make biff notify, so we should use the notify to notice the first chunk receiving.
Comment 1 Hiroyuki Ikezoe (:hiro) 2012-06-19 16:28:32 PDT
Created attachment 634648 [details] [diff] [review]

Try server result:

I also confirmed this change works fine on Windows XP.
Comment 2 David :Bienvenu 2012-06-25 17:45:46 PDT
Comment on attachment 634648 [details] [diff] [review]

very clever, Hiro, thx for the patch!
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-06-27 16:59:56 PDT

Note You need to log in before you can comment on or make changes to this bug.