Last Comment Bug 593321 - Opening saved .EML with empty subject has wrong window title
: Opening saved .EML with empty subject has wrong window title
Status: RESOLVED FIXED
: regression, testcase
Product: Thunderbird
Classification: Client Software
Component: Message Reader UI (show other bugs)
: 3.1
: All All
: -- minor (vote)
: Thunderbird 12.0
Assigned To: Hiroyuki Ikezoe (:hiro)
:
:
Mentors:
Depends on: 721071 738451
Blocks: 502389
  Show dependency treegraph
 
Reported: 2010-09-03 04:15 PDT by Onno Ekker [:nONoNonO UTC+1]
Modified: 2012-03-22 13:56 PDT (History)
6 users (show)
standard8: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Test message with empty subject line (404 bytes, message/rfc822)
2010-09-03 04:15 PDT, Onno Ekker [:nONoNonO UTC+1]
no flags Details
fix (986 bytes, patch)
2012-01-16 14:57 PST, Hiroyuki Ikezoe (:hiro)
mozilla: review+
Details | Diff | Splinter Review
Tests (3.53 KB, patch)
2012-01-17 17:04 PST, Hiroyuki Ikezoe (:hiro)
mozilla: review+
Details | Diff | Splinter Review
Revised test file (2.06 KB, patch)
2012-01-24 18:41 PST, Hiroyuki Ikezoe (:hiro)
hiikezoe: review+
Details | Diff | Splinter Review

Description Onno Ekker [:nONoNonO UTC+1] 2010-09-03 04:15:02 PDT
Created attachment 471806 [details]
Test message with empty subject line

When you save a message with an empty subject line and open it again by double clicking the file, you get a window with "nullMozilla Thunderbird" as title.
When you view the same message from within Thunderbird, you only see "Thunderbird" as title.

Steps to Reproduce:
1. Compose a message with an empty subject line and send it to yourself
2. View the message in a new window in thunderbird and verify the window title is "Mozilla Thunderbird"
3. Save the message as a file
4. Open the saved file and see the window title is now "nullMozilla Thunderbird"

The subject displayed in the window title should be the same as when viewed from within Thunderbird, so without the null part.
Comment 1 Ludovic Hirlimann [:Usul] 2010-09-06 01:33:18 PDT
Onno is this a regression ?
Comment 2 Onno Ekker [:nONoNonO UTC+1] 2010-09-06 10:05:39 PDT
In Thunderbird 2 the subject is initialized and the title is shown as "- Thunderbird".
In TB3.0.6 also the wrong "nullMozilla Thunderbird" is shown, so yes, it's a regression, but for version 3.0.
Comment 3 Ludovic Hirlimann [:Usul] 2010-09-08 05:58:56 PDT
(In reply to comment #2)
> In Thunderbird 2 the subject is initialized and the title is shown as "-

Can you try to figure out when this broke ?
Comment 4 Onno Ekker [:nONoNonO UTC+1] 2010-09-08 06:26:08 PDT
I cannot seem to find old releases of 3.0.1 or nightlies of around that version on http://ftp.mozilla.org/pub/mozilla.org/thunderbird/ :-(
Oldest version is 3.0.4...
Comment 5 Onno Ekker [:nONoNonO UTC+1] 2010-09-08 13:31:14 PDT
This has been bOrken since TB3.0b3. In alpha versions and earlier beta versions the opening of .EML files doesn't work at all...
Comment 6 Ludovic Hirlimann [:Usul] 2010-09-09 06:32:29 PDT
(In reply to comment #5)
> This has been bOrken since TB3.0b3. In alpha versions and earlier beta versions
> the opening of .EML files doesn't work at all...

Can you try to get a date range for that ?
Comment 7 Onno Ekker [:nONoNonO UTC+1] 2010-09-10 03:44:54 PDT
date       situation
2009-06-28 does not launch thunderbird on double click
2009-06-29 shows "null - Shredder" as windows title
...
2009-07-06 shows "null - Shredder" as windows title
2009-07-07 shows "nullShredder" as windows title
Comment 8 Ludovic Hirlimann [:Usul] 2010-09-13 01:32:04 PDT
2009-06-27 works ?
Comment 9 Onno Ekker [:nONoNonO UTC+1] 2010-09-13 02:19:23 PDT
No, before 2009-06-28 window doesn't open on double click...
Comment 10 Wayne Mery (:wsmwk, NI for questions) 2010-12-02 09:19:41 PST
> 2009-07-06 shows "null - Shredder" as windows title
> 2009-07-07 shows "nullShredder" as windows title

regression range points to this Bug 502389 - Thunderbird should make use of titlemodifier and titlemenuseparator attributes on the main and message windows - see http://hg.mozilla.org/comm-central/pushloghtml?startdate=2009-07-06&enddate=2009-07-07
Comment 11 Hiroyuki Ikezoe (:hiro) 2012-01-16 14:57:31 PST
Created attachment 589034 [details] [diff] [review]
fix
Comment 12 Hiroyuki Ikezoe (:hiro) 2012-01-17 17:04:18 PST
Created attachment 589362 [details] [diff] [review]
Tests
Comment 13 Magnus Melin 2012-01-23 02:53:12 PST
Please use MPL2 - http://www.mozilla.org/MPL/headers/
Also, can you add file documentation 
/**
 * Tests that opening an .eml file with emtpy subject works.
 */
header like ^^ to the test? That way dir listings with mxr are useful.
Comment 14 David :Bienvenu 2012-01-24 09:48:29 PST
Comment on attachment 589034 [details] [diff] [review]
fix

thx, Hiro!
Comment 15 David :Bienvenu 2012-01-24 09:50:37 PST
Comment on attachment 589362 [details] [diff] [review]
Tests

thx, Hiro, r=me, with a couple nits:

2012 copyright year

and

+  let expectedTitle;
+  if (subject)
+    expectedTitle = subject + " - " + productName;
+  else
+    expectedTitle = productName;
+
this can be just

let expectedTitle = (subject) ? subject + " - " + productName : productName;
Comment 16 Hiroyuki Ikezoe (:hiro) 2012-01-24 18:41:20 PST
Created attachment 591345 [details] [diff] [review]
Revised test file

Carrying over review +.
Switch to MPL2, add comment about the test and use ternary operator.
Comment 17 Mark Banner (:standard8) 2012-01-25 01:26:11 PST
Checked in: http://hg.mozilla.org/comm-central/rev/42920d816bd1

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