Last Comment Bug 766380 - test_imapHdrChunking.js should use nsIFolderListener instead of nsIMsgFolderListener and nsIStreamListener.
: test_imapHdrChunking.js should use nsIFolderListener instead of nsIMsgFolderL...
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Testing Infrastructure (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 16.0
Assigned To: Hiroyuki Ikezoe (:hiro)
:
Mentors:
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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix (5.02 KB, patch)
2012-06-19 16:28 PDT, Hiroyuki Ikezoe (:hiro)
mozilla: review+
Details | Diff | 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
   {
 #ifdef MOZ_THUNDERBIRD
     nsCOMPtr<nsIStringBundle> bundle;
     GetStringBundle(getter_AddRefs(bundle));
 
     if (!bundle)
       return;
 
+#if 0
     // Create the notification title
     nsString alertTitle;
     if (!BuildNotificationTitle(folder, bundle, alertTitle))
       return;
 
     // Let's get the new mail for this folder
     nsCOMPtr<nsIMsgDatabase> db;
     if (NS_FAILED(folderWithNewMail->GetMsgDatabase(getter_AddRefs(db))))
       return;
-
+#endif
     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) {
       NS_Free(newMessageKeys);

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]
Fix

Try server result:
https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=2a0c7d8a6f40

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]
Fix

very clever, Hiro, thx for the patch!
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-06-27 16:59:56 PDT
https://hg.mozilla.org/comm-central/rev/bed20da5f695

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