Opened 4 years ago

Last modified 4 years ago

#4055 closed change

Add unit tests for ElemHide.getSelectorsForDomain — at Initial Version

Reported by: kzar Assignee: kzar
Priority: P2 Milestone:
Module: Core Keywords:
Cc: trev Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



adblockpluscore/lib/elemHide.js contains a function getSelectorsForDomain which is used by adblockpluschrome to apply element hiding rules to webpages. It's a performance bottleneck currently and with #235 we are looking to improve that. Unfortunately it is not a trivial function and regressions (see #4054) are easy to miss.

What to change

Add unit tests for getSelectorsForDomain. Test adding of filters, removal of filters, getSelectorsForDomain itself. Take care to test both rules that don't apply to a domain such as, and rules that are overwritten by filter exceptions.

Change History (0)

Note: See TracTickets for help on using tickets.