Closed Bug 698238 Opened 13 years ago Closed 13 years ago

test-font-chooser.js fails on Windows after bug 454532

Categories

(Thunderbird :: Preferences, defect)

x86
Windows Server 2003
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 10.0

People

(Reporter: philor, Assigned: rain1)

References

Details

Attachments

(1 file, 1 obsolete file)

Happy: http://hg.mozilla.org/mozilla-central/rev/09780321b235
Sad: http://hg.mozilla.org/mozilla-central/rev/1c7e1db3645b (the merge from inbound that included bug 454532's "thou shalt have no Courier save Courier New")

http://tinderbox.mozilla.org/showlog.cgi?log=ThunderbirdTrunk/1319946748.1319947301.9044.gz

SUMMARY-UNEXPECTED-FAIL | e:\buildbot\comm-central-win32-opt-unittest-mozmill\build\mozmill\pref-window\test-font-chooser.js | test_font_name_displayed
  EXCEPTION: The monospace font should be Courier, but is actually Courier New.
    at: test-font-chooser.js line 97
       assert_fonts_equal("monospace","Courier","Courier New") test-font-chooser.js 97
       verify_advanced([object Object]) test-font-chooser.js 121
            frame.js 549
       WindowWatcher_notify([object XPCWrappedNative_NoHelper]) test-window-helpers.js 357
Looks like the test needs to be fixed.
The test uses the global font enumerator to enumerate all the fonts of a certain type (x-western monospace in this case) and picks the first font returned, which happens to be Courier since it comes first alphabetically on a default Windows XP configuration. If you're going to replace Courier by Courier New entirely, why does the font enumerator return Courier in the first place?
Attached patch workaround (obsolete) — Splinter Review
This should fix the issue. I've verified that with GDI, calling getStandardFamilyName for Courier returns Courier New. I'll push to try shortly.
Assignee: nobody → sagarwal
Status: NEW → ASSIGNED
Attachment #570685 - Flags: review?(mbanner)
removes the workaround that didn't work :)
Attachment #570685 - Attachment is obsolete: true
Attachment #570685 - Flags: review?(mbanner)
Attachment #570688 - Flags: review?(mbanner)
Comment on attachment 570688 [details] [diff] [review]
better workaround

Standard8 landed this with r=him.

http://hg.mozilla.org/comm-central/rev/2ac65ac0ab68
Attachment #570688 - Flags: review?(mbanner) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 10.0
I'd still like to have an answer to my question in comment 2 if possible.
(In reply to Siddharth Agarwal [:sid0] from comment #6)
> I'd still like to have an answer to my question in comment 2 if possible.

Filed bug 698809 about this.
Depends on: 698809
You need to log in before you can comment on or make changes to this bug.