Comment 1 for bug 315732

Revision history for this message
In , Philipp-bugzilla (philipp-bugzilla) wrote :

Taking, I have a patch about ready that just needs some testing. Aside from the obvious fix of using this.setParameter() (which btw also appears in calRelation.js), I noticed that setting the ical property doesn't seem to reset the property bag. Therefore a testcase similar to the following will fail:

let icalAttach1 = getICSService().createIcalProperty("ATTACH");
let icalAttach2 = getICSService().createIcalProperty("ATTACH");
let attach = cal.createAttachment();

icalAttach1.setParameter("X-THING", "FOO");

attach.icalProperty = icalAttach1;
do_check_eq(attach.getParameter("X-THING"), "FOO");
attach.icalProperty = icalAttach2;
do_check_eq(attach.getParameter("X-THING"), null);

Does this make sense? Or is there a use case for making the parameters stick?