mailnews/addrbook/test/unit/test_nsIAbCard.js has weak tests due to divergence of nsIAbCard between Thunderbird and SeaMonkey

REOPENED
Assigned to

Status

Thunderbird
Address Book
REOPENED
5 years ago
5 years ago

People

(Reporter: florian, Assigned: mconley)

Tracking

Trunk
Thunderbird 16.0

Thunderbird Tracking Flags

(thunderbird15 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
The test at mailnews/addrbook/test/unit/test_nsIAbCard.js is broken since I landed bug 759238.

The cause is obviously at http://mxr.mozilla.org/comm-central/source/mailnews/addrbook/test/unit/test_nsIAbCard.js#45 
There's an hard coded XML result of the conversion of an address book card containing an AIM screen name.
Investigating...
Assignee: nobody → mconley
(Reporter)

Comment 2

5 years ago
Created attachment 629910 [details] [diff] [review]
WIP

This make the test pass for Thunderbird, but would break the same test for SeaMonkey, as the C++ code contains ifdefs.
Created attachment 629929 [details] [diff] [review]
Wallpaper patch v1

This patch wallpaper over the failure by ensuring that the XML output for translateTo("xml") and translateTo("base64xml") match our expectations for Thunderbird OR SeaMonkey.

We're doing it this way because it's hard in XPCShell tests to determine which app we're in, and we're not able to do any preprocessing.

Hopefully we'll come up with a more graceful solution that doesn't weaken our tests after this lands, but the priority is to have a non-busted tree.

Ian: I don't have a SeaMonkey build handy. Do the nsIAbCard tests pass for you with this patch?
Attachment #629910 - Attachment is obsolete: true
Attachment #629929 - Flags: review?(iann_bugzilla)
Attachment #629929 - Flags: review?(florian)
(Reporter)

Comment 4

5 years ago
Comment on attachment 629929 [details] [diff] [review]
Wallpaper patch v1

This is OK with me. Thanks for taking care of this!
Attachment #629929 - Flags: review?(florian) → review+

Comment 5

5 years ago
Comment on attachment 629929 [details] [diff] [review]
Wallpaper patch v1

Test works both with and without the patch for SM (which is what is expected), so r=me
Attachment #629929 - Flags: review?(iann_bugzilla) → review+

Updated

5 years ago
Status: NEW → ASSIGNED
Thanks for the reviews - committed to comm-central as https://hg.mozilla.org/comm-central/rev/51f29333aafd.

Waiting for comm-aurora to open before I push there.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 16.0
Comment on attachment 629929 [details] [diff] [review]
Wallpaper patch v1

[Triage Comment]
a=me for bustage fix.
Attachment #629929 - Flags: approval-comm-aurora+
Checked in: https://hg.mozilla.org/releases/comm-aurora/rev/9dcedc936a8e
status-thunderbird15: --- → fixed
Not sure why I marked this RESOLVED FIXED, since the comments in my patch mention that a more thorough fix will come from this bug.
Status: RESOLVED → VERIFIED
Summary: mailnews/addrbook/test/unit/test_nsIAbCard.js fails because of the changes to the way AIM screen names are printed → mailnews/addrbook/test/unit/test_nsIAbCard.js has weak tests due to divergence of nsIAbCard between Thunderbird and SeaMonkey
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
You need to log in before you can comment on or make changes to this bug.