Closed Bug 1541139 Opened 5 years ago Closed 5 years ago

TEST-UNEXPECTED-FAIL | comm/mail/base/test/unit/test_windows_font_migration.js | xpcshell return code: 0

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 68.0

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

Details

(Whiteboard: [Thunderbird-testfailure: X Windows])

Attachments

(1 file)

TEST-UNEXPECTED-FAIL | comm/mail/base/test/unit/test_windows_font_migration.js | xpcshell return code: 0

EDIT: Wrong range, see comment #2.
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ea09774456976ada64ed753a00724ef6bc&tochange=92d1c344e7c53af9b8ad8a4192d93478f7

Hmm, something changed with Windows fonts, I can't see it right now. I'll have to check it out locally. BTW, this test only runs on Windows:
https://searchfox.org/comm-central/rev/9bc5aee7e03b167f154af5011a9f6ab286ad7bf0/mail/base/test/unit/xpcshell.ini#18

Very strange, test fails with:
0:01.02 ERROR NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getIntPref]
and debug shows that it got font.size.variable.x-unicode successfully and fails on font.size.fixed.x-unicode.

The test passes if I remove these two lines:

    // Assert.equal(Services.prefs.getIntPref("font.size.fixed." + aEncoding),
    //              expectedFonts.fixedSize);

Weird.

Wrong regression range, that was already present earlier:https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e8b3c73b4e328be88aa90f31e1fa9772b5&tochange=ea09774456976ada64ed753a00724ef6bc

So it looks like
Bug 1537575 - Cleanup generic font-family handling. r=jfkthame

Emilio, where did that preference get lost?

Flags: needinfo?(emilio)

Actually, it's https://hg.mozilla.org/mozilla-central/rev/663c37508e2f. s/fixed/monospace on the test should do.

Flags: needinfo?(emilio)

Great, thanks. Well, I got the right person to talk to :-)

That needed to hit all 13 occurrences in the entire tree.

Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Attachment #9055318 - Flags: review?(acelists)
Comment on attachment 9055318 [details] [diff] [review]
1541139-monospace.patch

Review of attachment 9055318 [details] [diff] [review]:
-----------------------------------------------------------------

So what about users that have that pref modified? Do we need migration code for them? Or will it somehow happen automatically?

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/7bfb148ee3d1
Port bug 1537594: s/font.size.fixed./font.size.monospace./ in C-C. rs=bustage-fix

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

OK, I landed that now. I hit font.size.fixed. in the entire tree, 13 occurrences. The one in MailMigrator.jsm was necessary to get the test to pass.

Emilio, can you please look at the patch? As Aceman pointed out, what happens if people have changed the prefs?

Flags: needinfo?(emilio)
Target Milestone: --- → Thunderbird 68.0

I tested it and now TB just uses the new prefs ignoring the old ones. So this needs decision whether we want to add migration code for this (just take all the font..fixed. prefs and move them to the new name).

Not in this bug ;-)

Flags: needinfo?(mkmelin+mozilla)

There are two sets of prefs, font.size.monospace. and font.size.fixed., we're not migrating the prefs automatically because it's not clear which one should override which. We mostly used to use the monospace prefs, except in some cases.

I guess you could convert the fixed ones to monospace if the monospace one isn't set. Regarding the patch, there's a list where font.size.monospace appears twice. Looks ok otherwise.

Flags: needinfo?(emilio)

(Doesn't sound like there's really too much need to migrate.)

Flags: needinfo?(mkmelin+mozilla)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #11)

Regarding the patch, there's a list where font.size.monospace appears twice. Looks ok otherwise.

I can't see it, maybe you can point it out or the reviewer can spot it.

Comment on attachment 9055318 [details] [diff] [review]
1541139-monospace.patch

Review of attachment 9055318 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/base/test/unit/test_windows_font_migration.js
@@ +128,5 @@
>   */
>  var kPrefBranchesToClear = [
>    "font.name.serif.",
>    "font.name.sans-serif.",
>    "font.name.monospace.",

Here.

@@ +130,5 @@
>    "font.name.serif.",
>    "font.name.sans-serif.",
>    "font.name.monospace.",
>    "font.size.variable.",
> +  "font.size.monospace.",

And here.

Umm, one is size, the other name?

Err, I'm blind, sorry :(

(In reply to Magnus Melin [:mkmelin] from comment #12)

(Doesn't sound like there's really too much need to migrate.)

Well, users will lose their settings. Some of them may not know how to set them back (think pre-configured installs for older people and with sight problems).

Attachment #9055318 - Flags: review?(acelists) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: