If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

create a test that checks for proper operation of updating of filter target folder in case of folder move (rename)



MailNews Core
5 years ago
9 months ago


(Reporter: aceman, Unassigned)


(Depends on: 1 bug)

Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)




5 years ago
The test should cover the functions nsMsgFilterList::MatchOrChangeFilterTarget() and nsMsgDBFolder::MatchOrChangeFilterDestination().

These 2 functions were touched by me in bug 707306, bug 735940, bug 737946, bug 742155 and breakage can happen (and already has :(). Problems in these functions can cause dataloss (corrupting filter definitions).

What I think the test should do:
1. have folders A, B, C, B/D, B/E.
2. have a filter F1 to have a copy action that points to B.
3. have a filter F2 to have a copy action that points to B/D, a a copy action that points to B, a move action that points to B/E (3 actions).
4. have a filter F3 to have a copy action that points to C.
5. now rename (move) folder B/D to be C/D.
6. check all the filters are updated (or untouched) correctly.

I do not know if this should be a xpcshell or a mozmill test.
Can anybody help with this?
Flags: in-testsuite?

Comment 1

5 years ago
probably mozmill, since there's ui involved. You might be able to fake out the prompt, but mozmill is most likely easier.
The filters code is unfamiliar with me, but my rules of thumb are:

* If the logic resides in the UI layer, then you should be using Mozmill.
* If the logic resides in the back-end, but the back-end spawns windows or prompts, you'll likely have an easier time writing a Mozmill test.

Comment 3

5 years ago
Thanks, I was not thinking of testing the prompt (I wanted to ignore it) so I considered this pure backend.

But yes, testing the prompt (from bug 737946) would be a nice addition too (as it is broken till now).

So mozmill would be nice, but needs to go all the way from creating folders, then filters, then move folder, then the prompt and then checking the filters. Quite involved.
is account renames (bug 706826) covered in this bug?
You need to log in before you can comment on or make changes to this bug.