Opened on 02/21/2016 at 09:14:44 PM
Closed on 05/26/2016 at 08:20:29 AM
#3675 closed change (fixed)
[abp2blocklist] Add unittests
Reported by: | sebastian | Assignee: | kzar |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Platform | Keywords: | |
Cc: | kzar | Blocked By: | #3671 |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by kzar)
Background
With #3671, abp2blocklist provides a proper API. So we can finally start writing automated tests. We want to use Nodeunit as that is what we use for the adblockpluscore repository.
What to change
Introduce unittests, that run against the API introduced with #3671. The tests should be as granular as possible, and include at least following test cases:
- Verify the order of generated blocking rules, regardless of the order in which the corresponding filters been passed to the API. The mandatory order is:
- Element hiding rules
- $elemhide exception rules
- Request blocking filters
- Other exception rules
- Verify that Adblock Plus request type filter options are mapped correctly to the corresponding trigger.resource-type.
- Verify that unsupported filter, like those using the $sitekey option, are ignored.
- Verify that other filter options, including $domain, $third-party and $match_case, are converted correctly.
- Verify that IDN domains are converted to punycode.
- Verify that filters that use non-ASCI characters (that aren't converted as part of the domain) are removed from the resulting block list.
- Verify that element hiding exceptions cause the respective element hiding filter to be removed from the generated block list.
- Verify that ID selectors are replaced wit attribute selectors, see #3584.
Attachments (0)
Change History (9)
comment:4 Changed on 05/25/2016 at 11:44:25 AM by kzar
- Owner set to kzar
comment:5 Changed on 05/25/2016 at 04:22:30 PM by kzar
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:8 Changed on 05/26/2016 at 08:19:19 AM by abpbot
comment:9 Changed on 05/26/2016 at 08:20:29 AM by kzar
- Resolution set to fixed
- Status changed from reviewing to closed
Note: See
TracTickets for help on using
tickets.
A commit referencing this issue has landed:
Issue 3675 - Test ContentBlockerList