Add tests for imContentSink.jsm

RESOLVED FIXED in Thunderbird 18.0

Status

Thunderbird
Instant Messaging
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: florian, Assigned: florian)

Tracking

Trunk
Thunderbird 18.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

imContentSink.jsm is the file where we filter out unwanted content from received messages before displaying them, so we should really not let regressions slip into it.
Created attachment 657887 [details] [diff] [review]
WIP
Created attachment 657938 [details] [diff] [review]
Patch v2

Mike, I think you wrote way more unit tests than Patrick and me, so I'm wondering if you would have some interesting feedback to offer on this.

Note for the code review: The change to newRuleset is just some cleanup. The change to cleanupNode fixes https://bugzilla.instantbird.org/show_bug.cgi?id=962.
Attachment #657887 - Attachment is obsolete: true
Attachment #657938 - Flags: review?(clokep)
Attachment #657938 - Flags: feedback?(mconley)
Comment on attachment 657938 [details] [diff] [review]
Patch v2

+  // Allow id only with numbers.
+  addGlobalAllowedAttribute("id", function(aId) /^[0-9]+$/.test(aId));
Not /^\d+$/?

Besides that it looks OK (and all the tests pass ;)). As far as I can tell this should be a pretty thorough test of the content sink.
Attachment #657938 - Flags: review?(clokep) → review+
Comment on attachment 657938 [details] [diff] [review]
Patch v2

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

Looks OK to me.
Attachment #657938 - Flags: feedback?(mconley) → feedback+
https://hg.mozilla.org/comm-central/rev/e0f0c746579f
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 18.0

Comment 6

5 years ago
http://hg.instantbird.org/instantbird/rev/404468ca63b9
You need to log in before you can comment on or make changes to this bug.